cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jja
Level: Powered On

Field value based on selection in another field

Hi

I have a list and a form where i select record type lets say A. IF user selects record type A then for him powerapps form shows 2 fields x and y to fill. IF user selects record type B then form shows for him fields  w and z to fill.

in flow when sending approval and mail and need to use these fields. How to achieve  in flow so that if record A is selected i put z and y in details and if record B is selected i use w and z fields?

I know how to do that with Condition and then build additional block but this will enlarge my flow. Can i do it in a single logic not using conditions?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Field value based on selection in another field

Hi @jja,

 

You can use the logic function to input the approval title and content according to the dynamic content. If so, the Flow will not be enlarged.

 For example:

if(equals(triggerBody()['text'],'A'),'I want A','I want B')

 

You can refer to this document:

reference#logical-comparison-functions

Annotation 2019-08-28 165326.png

You can have a try, I hope it can help you.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Field value based on selection in another field

Hi @jja,  I would do this with a Switch case and put the email with the correct fields in each switch box, like  in the example below.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

SwitchCaseExample.png

jja
Level: Powered On

Re: Field value based on selection in another field

Hi

Yes i know how to do that but this is multi approval flow this means i will have 2 separate blocks and it will be a pain to maintain this... if i could get this with a functio nand then within th efunction to return corect value based on that field

Community Support Team
Community Support Team

Re: Field value based on selection in another field

Hi @jja,

 

You can use the logic function to input the approval title and content according to the dynamic content. If so, the Flow will not be enlarged.

 For example:

if(equals(triggerBody()['text'],'A'),'I want A','I want B')

 

You can refer to this document:

reference#logical-comparison-functions

Annotation 2019-08-28 165326.png

You can have a try, I hope it can help you.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
jja
Level: Powered On

Re: Field value based on selection in another field

Thanks that makes the trick!

Thow now i am in doubt weather to use this easer approach or separate this flow into additional block based on customer type for future different processes configuration if needed. But anyway now i know how to use this if function. Thanks a lot

Super User
Super User

Re: Field value based on selection in another field

Unless I'm mising something it doesn't answer your original question which I thought was you wanted the fields to change in the details of the approval email depending on what was selected, not just a change to the title.

Rob
Los Gallardos

jja
Level: Powered On

Re: Field value based on selection in another field

@RobElliott 

No i wanted just to take the coresponding field values if a certain type is selected.

With your approach i can create completely different logic based on the selected type what is very good and what i am considering now

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 273 members 6,114 guests
Please welcome our newest community members: