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

String functions in a flow with dynamic content

Hi,

 

I am building a flow, where I have to add a registrant from an Email to GoToWebinar Webinar. 

 

I have to convert the webinar name abstracted from the Email to match the GoToWebinar name:

 

<Date> <Webinar Name> <Speaker>

20200903 Name of the webinar TR --> Name of the Webinar

 

It seems that I am not able to use dynamic content in replace / substring functions.

Substring example after removing the date with substring(variables('WebinarName'),9) --> Name of the webinar TR 

 

LengthOfName integer variable: length(variables('WebinarName')) --> for example 22 (ok)

 

NewLength: sub(variables('LengthOfName'),-3) --> does not succeed

 

NewName: substring(variables('WebinarName'),1,variables('NewLength')) or 

NewName: substring(variables('WebinarName'),1,variables('LengthOfName')) --> does not succeed even if Length of Name is given manually as 19 at the initialize variable

 

With replace the same problem with dynamic content in function

 

variable Speaker: last(split(variables('WebinarName'),' ')) --> TR

 

Compose function: ' @{variables('Speaker')}' --> ' TR'

 

initialize variable CleanName: replace(variables('WebinarName'),variables('Speaker'),'') --> does not work

replace(variables('WebinarName'),' TR','') --> works

 

Is there any way to remove the speaker name from the end?

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @Treadmill ,

 

Is TR a constant? If so, you can consider the following expression to extract data:

17.PNG

substring(outputs('Compose'),9,sub(length(outputs('Compose')),9))
split(outputs('Compose_2'),'TR')[0]

 

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
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

1 REPLY 1
v-bacao-msft
Community Support
Community Support

 

Hi @Treadmill ,

 

Is TR a constant? If so, you can consider the following expression to extract data:

17.PNG

substring(outputs('Compose'),9,sub(length(outputs('Compose')),9))
split(outputs('Compose_2'),'TR')[0]

 

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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 Solution Authors
Users online (1,100)