Hi Team,
Happy New Year all!
I have an Attachment Box (DataCardValue) where I can browse and attach files, I have a Drop down which has country names, The files to be attached will have the country name in their suffix eg: (Data_Spain.Xlsx), I need to check if the Dropdown selected value matches the name in the file attachment.
For this I have created 2 label - fetching the Filename from attachment and displaying in 1 label and fetching the dropdown selected value and displaying in another label.
Now I need to compare these 2 Label and check if the country name is present in the Filename to be attached. If matches allow user to upload if not matches say not to upload.
I tried ISMATCH funtion but no help.
Any other possibilities ?Thanks-Sarath
Solved! Go to Solution.
Set DisplayMode property of a button to:
If (Label2.Text in Label1.Text, DisplayMode.Edit, DisplayMode.Disabled)
In this way you can be sure that the user cannot use the button if your condition isn't met.
Additionally you can put a label with something similar in Text property.
If (Label2.Text in Label1.Text, "","Upload blocked ! Check the filename or select a different country !")
Hi @sarath_123 ,
Did you modify "Match options" in IsMatch function?
Default is "Complete", in your scenario should use "Contains", hope this help!
IsMatch( your_file_name, "Spain", Contains )
Set DisplayMode property of a button to:
If (Label2.Text in Label1.Text, DisplayMode.Edit, DisplayMode.Disabled)
In this way you can be sure that the user cannot use the button if your condition isn't met.
Additionally you can put a label with something similar in Text property.
If (Label2.Text in Label1.Text, "","Upload blocked ! Check the filename or select a different country !")
Thank you !
Here "Spain" will not be a constant value always.
It will get dynamic from the Country Dropdown.
Thanks-Sarath
If (Label2.Text in Label1.Text, DisplayMode.Edit, DisplayMode.Disabled)
This worked - Thank you
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
206 | |
188 | |
77 | |
49 | |
37 |
User | Count |
---|---|
315 | |
262 | |
122 | |
73 | |
58 |