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

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
Community Support

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 Helper IV
Helper IV

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
Community Support

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

jja Helper IV
Helper IV

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

Highlighted
jja Helper IV
Helper IV

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,720)