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

With lists , SharePoint Designer was able to manipulate the URLS of any field, with a workflow to append a parameter to a URL and what not.

But since SP Designer has been sunsetted at a place I'm at, is there away to do something similar with Power Automate (Flow )?
A new list item is created , there is a hyperlink field and in the workflow a parameter could be appended.

Is this possible with Power Automate, what more, does a good amount of what SP Designer did be done in Flow?

Thank in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi again!

Yes, the kind of scenario that is not trivial with PowerAutomate. Please also note you cannot do it anymore with Calculated columns.

Your first step is to think: when and how is http://mydomain.com/sites/urpage.aspx added to your column.

If such URL is to be added since the beginning, the item is created manually, nobody is gonna change it, an the variable to be added will never change (Sharepoint item ID, for example) then it is quite simple:

-When an item is created

-Update item

and assign the following expression to your URL column:

concat(triggerbody()?['URpage'],'?ID=',triggerbody()?['ID'])

 

Now, instead of addind the ID, let's assume you need to add the content of a column called 'LastName', let's also assume the value inside 'LastName' can change in the future (who has this laptop, for example), and let's also assume your variable appended to the URL shall change also. Things get more complex:

 

TRigger: When an item is created or modified

Add a Condition action block:

on the left side of your Condition, assign the following expression

endsWith(triggerBody()?['URpage'],'triggerBody()?['LastName'])

on the right side of your condition, assign the following expression

true

select 'equals' as the operator

 

Now on the true branch, do nothing

On the false branch, add an 'Update item' action block, and assign to column URPage the following expression:

concat(triggerbody()?['URpage'],'?LastName=',triggerbody()?['LastName'])

 

These are the most common simple scenarios, but things can get extremely complex depending on your requirements, and even lead to infinite loops if you do not design the logic carefully. Please check this links if you want to get more info about this topic:

https://powernimbus.com/2019/06/microsoft-flow-avoiding-the-sharepoint-list-update-trigger-infinite-...

https://medium.com/@gurdevluck/prevent-infinite-loop-in-microsoft-flow-power-automate-b3cf9d764926

 

One more comment: you can implement the validations with a condition action block after the trigger, or add the validations in the trigger itself, transforming it into a 'conditional trigger'. If you can implement it in this second way, then you will optimize the nr of times your flow is executed.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

4 REPLIES 4
Super User III
Super User III

@MikeRooker 

Let's see I understood your requirements.

So, someone creates an item in a Sharepoint list, the list has an hyperlink column, you need your flow to update the URL and add a parameter, right?

Is the following example valid?

http.bing.com -> https://www.bing.com/search?q=hola
If so, you can rely on concat() expression

If not, can you share your own example so we can understand better what you are looking for?

Thanx!

 

P.D. Tool migrations are usually a pain in the ass. Ánimo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hello efialttes ! Yes exactly. That was every simple to do in SP Designer. But since it is not allowed to use SPD in the place I'm helping, how do you do that in Power Automate?
So for example, we have a column named "URpage" and it has a hyperlink:  http://mydomain.com/sites/urpage.aspx so I would like to dynamically append either the row ID or a last name column to the hyperlinks in a list. So in effect http://mydomain.com/sites/urpage.aspx?ID= and the append the ID. or maybe the last name, etc.
It should be triggered when a new item is created OR manually. How do you this is Power Automate?
Thank you again for all your genius and kindness. I am very grateful.

Hi again!

Yes, the kind of scenario that is not trivial with PowerAutomate. Please also note you cannot do it anymore with Calculated columns.

Your first step is to think: when and how is http://mydomain.com/sites/urpage.aspx added to your column.

If such URL is to be added since the beginning, the item is created manually, nobody is gonna change it, an the variable to be added will never change (Sharepoint item ID, for example) then it is quite simple:

-When an item is created

-Update item

and assign the following expression to your URL column:

concat(triggerbody()?['URpage'],'?ID=',triggerbody()?['ID'])

 

Now, instead of addind the ID, let's assume you need to add the content of a column called 'LastName', let's also assume the value inside 'LastName' can change in the future (who has this laptop, for example), and let's also assume your variable appended to the URL shall change also. Things get more complex:

 

TRigger: When an item is created or modified

Add a Condition action block:

on the left side of your Condition, assign the following expression

endsWith(triggerBody()?['URpage'],'triggerBody()?['LastName'])

on the right side of your condition, assign the following expression

true

select 'equals' as the operator

 

Now on the true branch, do nothing

On the false branch, add an 'Update item' action block, and assign to column URPage the following expression:

concat(triggerbody()?['URpage'],'?LastName=',triggerbody()?['LastName'])

 

These are the most common simple scenarios, but things can get extremely complex depending on your requirements, and even lead to infinite loops if you do not design the logic carefully. Please check this links if you want to get more info about this topic:

https://powernimbus.com/2019/06/microsoft-flow-avoiding-the-sharepoint-list-update-trigger-infinite-...

https://medium.com/@gurdevluck/prevent-infinite-loop-in-microsoft-flow-power-automate-b3cf9d764926

 

One more comment: you can implement the validations with a condition action block after the trigger, or add the validations in the trigger itself, transforming it into a 'conditional trigger'. If you can implement it in this second way, then you will optimize the nr of times your flow is executed.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

 efialttes < AMAZING
goldstars.jpg

Thank you Master efialttes !

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (33,084)