question

rt96-7577 avatar image
0 Votes"
rt96-7577 asked DrewKlein-0586 published

SharePoint calculated column using part of URL

Hi guys

I am trying to do something new.

I would like to create a calculated column that contains part of current URL by default. So for example;

https://tenant.sharepoint.com/sites/pwa/Project%20Detail%20Pages/Benefits%20SP.aspx?ProjUid=6b2dad8e-71d5-ea11-b08e-00155d0c8600&ret=0

The URL contains ProjUid. I would like to get this value into a SharePoint list column (text is fine) for new items. Any ideas how?!

office-sharepoint-online
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@rt96-7577 Is there any progress on your issue? You could accept my reply as answer if it helps you.

0 Votes 0 ·
MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered MichaelHan-MSFT commented

SharePoint caculated columns can only reference other columns in the same row, it's impossible to reference the value in current URL. You could check this article for calculated columns: examples-of-common-formulas-in-sharepoint-lists


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, how about workflow, can that be used to grab the ProjUid part of the URL?

0 Votes 0 ·

@rt96-7577
Is there anything update? Please remember to accept my reply as answer if it helps you.

0 Votes 0 ·
MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered MichaelHan-MSFT edited

Hi, @rt96-7577

You can use rest api in the workflow to get the ProjectUID. The steps are in this article: project-web-app-get-project-id-from-project-related-site-via-rest


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.