Skip to main content
Nintex Community Menu Bar

Hi Team,

I am developing workflows in NWC and we have many actions related creating list item, update item and query list etc. Each time Site URL is hardcoded under SharePoint Site URL. Is there a way we can save the URL in a variable and refer that variable wherever is needed.

Or is there a way to get site URL from context. Please suggest the best practice.

Thanks!

Hi @Krishna521 

 

Here's my idea

 

1. Save the URL in a SharePoint List

[Title] | [Type] | URL

App1 | Dev | www0

App1 | Prod | www1 

 

2. Query the List - Where Title=App1, Type=Prod

 

3. Save the result to a variable

varURL = "www1"

 

Hope that helps


Thanks for the response. Even to query the sharepoint list, we need provide site url. Is that correct?

Consider this SharePoint List as the single source of truth in your team or organization.

 

If you wish, you could set up another resource to replace the SharePoint list as the single source of truth e.g. a Web Service, a SQL Database, an Excel file, a Word document, a XML file or a plain Text file. Then store the list of URLs into that resource. 

 

1. Save the URLs in your desired resource

2. Query the resource - Where Title=App1, Type=Prod

3. Save the result to a variable

 


Hi @Krishna521, Upon further research and exploring...

You can get the SPO Site URL. Refer to the image below

 


Did you test this ​@Krishna521, because it did not work for me or the Nintex engineer who I had a call with today.


Hi ​@tony_monserrate,

Are you able to provide more information about what is not working?
Did the Site URL not appear for you or was there another issue?


So it works, but the explanation provided is incorrect.  For all the noobs (like me) to NAC, here is how it works.

Using the “update field action as an example”

You must first hard code the:

  • SharePoint site URL
  • Retrieve your list
  • Choose the property/column you wish to update.

Once you have done this, you can then replace the site url with a site context “site url” and “list name”.  You basically need to hard code it to make the connection.  Once you do this, you can make the url and list name dynamic. Here is a link to the resource video explaining it further: Nintex Workflow Cloud: Azure Active Directory - Get Members of an Azure AD Group Action - YouTube