cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Populate dropdown based on another dropdown and textfield

I am trying to populate dropdown on selection of another dropdown using below formula 

 

If((DataCardValue109.Selected.Value)="Completed",["Approved"],((DataCardValue109.Selected.Value)="Completed" && IsBlank(Trim(DataCardValue30_1.Text))),["Rejected"])

 

it work for first condition and give Approved  but if i check second condition with textbox blank value it does not work  and it gave first condition value only that is Approved .

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Populate dropdown based on another dropdown and textfield

Hi @Ashok2 

 

This is not working because of the order of the specified condition, even if the textbox is empty, it will satisfy the first condition and will not look for the second one. Can you try to update the expression to:

If(DataCardValue109.Selected.Value="Completed" && IsBlank(Trim(DataCardValue30_1.Text)),["Rejected"],DataCardValue109.Selected.Value="Completed",["Approved"])

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3
Highlighted
Helper IV
Helper IV

Re: Populate dropdown based on another dropdown and textfield

Any help in this
Highlighted
Community Support
Community Support

Re: Populate dropdown based on another dropdown and textfield

Hi @Ashok2 ,

The reason why you met this problem is that :

these two conditions have conflict.

Please tell me, when DataCardValue109.Selected.Value="Completed", the drop down should display ["Approved"] or ["Rejected"]?

You need to give two conditions that have no conflict that will not lead to ambiguity.

Please try to modify your formula like this:

If(DataCardValue109.Selected.Value="Completed"&&!IsBlank(Trim(DataCardValue30_1.Text)), 
   ["Approved"],
   DataCardValue109.Selected.Value="Completed" && IsBlank(Trim(DataCardValue30_1.Text)), 
   ["Rejected"]
  )

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Dual Super User
Dual Super User

Re: Populate dropdown based on another dropdown and textfield

Hi @Ashok2 

 

This is not working because of the order of the specified condition, even if the textbox is empty, it will satisfy the first condition and will not look for the second one. Can you try to update the expression to:

If(DataCardValue109.Selected.Value="Completed" && IsBlank(Trim(DataCardValue30_1.Text)),["Rejected"],DataCardValue109.Selected.Value="Completed",["Approved"])

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,334)