I have a table named Vacation in Dataverse as such:
Tag | Name | Request |
1 | Sam | Approved |
1 | Harry | Approved |
2 | Jane |
|
2 | Mary |
|
In my Power Apps, I have a dropdown control ("Dropdown") that is supposed to filter by Tag and show the first Request value (if it exists). For example, if Tag is 1, then Dropdown should show "Approved". If Tag is 2, then Request is blank. In this case, the Dropdown should give the user the options to choose from: ["Approved", "Rejected", "Under Review"].
This is the formula that I have in the Items property of Dropdown.
If(
LookUp('Vacation', 'Tag' = Tag_control.SelectedText.Value).'Request',
Text(LookUp('Vacation', 'Tag' = Tag_control.SelectedText.Value).'Request'),
["Approved", "Rejected", "Under Review"]
)
I can't get the dropdown to function. I get this error - "invalid argument type (Table). Expecting a text value instead".
I'm not sure why, because I used the Text() function to wrap the second LookUp statement.
Could someone please help?
hi @anonymous16 assuming your tag selected comes form the gallery this may be an option for you.
Set the DropDown's Items = If(yourGallery.Selected.tag = 1,["Approved"],["Approved", "Rejected", "Under Review"])
Result
Hope it helps ,
R
Thanks @rubin_boer for your response. I re-read my question and realized that I should have added some clarity. The Dropdown should show the corresponding value in the Request column for the given Tag. It's not necessary that Tag 1 always maps to Approved - I only used that as an example. If Tag 1 was previously mapped to Rejected for example, then I would need Rejected to appear in the Dropdown.
A given Tag number will have the same value in the Request column.
hi @anonymous16
no problem, make the follwing change
Set the DropDown's Items = If(yourGallery.Selected.tag = 1,[yourGallery.Selected.Request],["Approved", "Rejected", "Under Review"])
The dropdown will display the value of Request for that entry.
Hope it helps,
R
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
193 | |
45 | |
44 | |
38 | |
35 |
User | Count |
---|---|
262 | |
82 | |
81 | |
70 | |
67 |