Home > Forum > Actions > Sharepoint with dynamic URL based on a form field

Sharepoint with dynamic URL based on a form field
0

Hello all,

I want to set up an action to Add a new list element in a Sharepoint list where my URL will be different based on a form field.

But when I'm selecting the list where I want to add my new elements, we can only choose the ones in that site content.

Does anyone have any idea on this?
Thank you all!!!

MVP

Hi Andreia,

the only option I see is to create one action for each possible list and set an execution condition.
The default action can not simply use a dynamic URL. The reason for this is quite simple, the internal field names can differ in each list and than it would break.

You could use REST to achieve this:
https://stuartmccoll.github.io/posts/2020-06-18-creating-list-items-with-sharepoint-rest-api/

Personally I would use the first approach, if there is only a two digit number of lists. :)

If I'm wrong I would be glad to be corrected. :)

Best regards,
Daniel

In reply to: Daniel Krüger (Cosmo Consult)

Hi Andreia,

the only option I see is to create one action for each possible list and set an execution condition.
The default action can not simply use a dynamic URL. The reason for this is quite simple, the internal field names can differ in each list and than it would break.

You could use REST to achieve this:
https://stuartmccoll.github.io/posts/2020-06-18-creating-list-items-with-sharepoint-rest-api/

Personally I would use the first approach, if there is only a two digit number of lists. :)

If I'm wrong I would be glad to be corrected. :)

Best regards,
Daniel

Hi Daniel!

Thank you for your kind answer.
The team decide to try on the sharepoint side copying the data for another list and I'm only adding new items in a global one.

But I saved the link you sent me, Rest is something that I didn't explored yet! But will for sure!

Thank you

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.