Access site custom properties from a workflow
Is it possible to access site custom properties from a workflow? That is how can I access custom properties from within a workflow, these are custom properties that I set on the site information page. I know how to do it for a layer but I want similar capabilities for a site.
0
-
Yes. You can do a webrequest to the site's REST endpoint and then parse the resulting JSON: - Add a GetRequestInfo to the workflow
- Use a WebRequest with Uri = requestInfo.ApplicationUri & "/Sites/YOURSITEID" and parameter f="json". If the site is protected, also add a parameter named token with value requestinfo.Token
- Use GetTextFromBytes to convert the Byte array to a string
- Use GetJsonValue to parse the properties of the site
0 -
Thank you Berend, I will give that a try. Much appreciated. 0 -
Just confirming that it worked as promised. Thanks again Berend 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer