cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JCH92
New Member

Replacing Different Possible Text Strings to One Output

I hope I can explain this correctly!

 

I have a Microsoft Form that is giving me the name of an Exhibition, it could be one of multiple different exhibitions and I am having to replace the text name of the exhibition to the GUID value of the exhibition from the choices in the column 'Exhibition'.  I'm doing this so I can have the Form create a lead record in Dynamics automatically. 

 

At the moment I have this working but it only allows me to have one choice of exhibition in the form:

replace(outputs('InputExhibitionName'),'ExhibitionA','100000008')

 

I believe it must be a singular output so that the Dynamics 'Create a new record' can be successful.

 

JCH92_0-1652693935159.png

JCH92_1-1652693997040.png

 

Thanks in advanced for your help.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Heartholme
Continued Contributor
Continued Contributor

Hi @JCH92 ,

 

This can be solved with a good old if sentence, put this as an expression in your "Replace exibition name":

 

if(equals(outputs('InputExhibitionName'), 'ExhibitionA'), replace(outputs('InputExhibitionName'),'ExhibitionA','100000008'),
if(equals(outputs('InputExhibitionName'), 'ExhibitionB'), replace(outputs('InputExhibitionName'),'ExhibitionB','100000009'),
if(equals(outputs('InputExhibitionName'), 'ExhibitionC'), replace(outputs('InputExhibitionName'),'ExhibitionC','100000010'),0)))

 

Replace the 10000009 and 100000010 to your liking.

 

Let me know how it goes 😄

 

{ If my post answered your question, please Accept it as a solution ✔ }
{ This will in turn help others find solutions to similar questions }

Best Regards
Heartholme

View solution in original post

3 REPLIES 3
Heartholme
Continued Contributor
Continued Contributor

Hi @JCH92 ,

 

This can be solved with a good old if sentence, put this as an expression in your "Replace exibition name":

 

if(equals(outputs('InputExhibitionName'), 'ExhibitionA'), replace(outputs('InputExhibitionName'),'ExhibitionA','100000008'),
if(equals(outputs('InputExhibitionName'), 'ExhibitionB'), replace(outputs('InputExhibitionName'),'ExhibitionB','100000009'),
if(equals(outputs('InputExhibitionName'), 'ExhibitionC'), replace(outputs('InputExhibitionName'),'ExhibitionC','100000010'),0)))

 

Replace the 10000009 and 100000010 to your liking.

 

Let me know how it goes 😄

 

{ If my post answered your question, please Accept it as a solution ✔ }
{ This will in turn help others find solutions to similar questions }

Best Regards
Heartholme

JCH92
New Member

Perfect - this sorted it!

 

Thanks for your help.

Heartholme
Continued Contributor
Continued Contributor

Great! I'm glad to hear. You're very welcome 😊

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,801)