cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jja
Resolver I
Resolver I

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
v-litu-msft
Community Support
Community Support

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
RobElliott
Super User
Super User

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

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

v-litu-msft
Community Support
Community Support

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

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

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

@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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (2,156)