cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jja
Responsive Resident
Responsive Resident

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

jja
Responsive Resident
Responsive Resident

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.

jja
Responsive Resident
Responsive Resident

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

jja
Responsive Resident
Responsive Resident

@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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,378)