Hi there,
I'm creating a powerapp in which I want to display records of a CDS Entity. My problem is that I would like to insert InputText filters to display only some records. I tryed to use but I cannot find the correct syntax to do that. I tried Filter(DataTable1; TextInputNome.Text = cr5a8_primaryname) but it gives me syntax error.
Could you please show me some examples?
Here's what I have:
Solved! Go to Solution.
You're close to the solution. Instead of using DataTable1 as the first parameter of the Filter expression, you should use the name of your data source (your entity):
Filter(EntityName; cr5a8_primaryName = TextInputName.Text)
Hope this helps!
You're close to the solution. Instead of using DataTable1 as the first parameter of the Filter expression, you should use the name of your data source (your entity):
Filter(EntityName; cr5a8_primaryName = TextInputName.Text)
Hope this helps!
Thank you very much Carlos, you made my day! Can I ask you also how can I show all the rows while there is no filter? And how about using multiple filter?
Thanks again for your help, I think it could be very helpful for other people also.
If there is no text in that text input, then you can use the If function:
If( TextInputName.Text = ""; EntityName; Filter(EntityName; cr5a8_primaryName = TextInputName.Text))
Or an Or expression in the filter:
Filter(EntityName; TextInputName.Text = "" Or cr5a8_primaryName = TextInputName.Text)
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
252 | |
236 | |
82 | |
36 | |
27 |
User | Count |
---|---|
317 | |
265 | |
122 | |
68 | |
44 |