Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Why does gs.getProperty() return wrong value?

Larry Lau
Kilo Expert

I am a newbie to ServiceNow Flow Designer.  I have created a Flow Action to fetch a couple properties like this.

outputs.defaultmembers = gs.getProperty('x_xxx_extranet.defaultMembers');
outputs.trusteddomains = gs.getProperty('x_xxx_extranet.trustedDomains');

The defaultMembers property has a value of a user name say "admin"

The value returned by the Action would look something like like "{{466544a0-4474-44cc-af79-e9c34c015cc9.defaultMembers}}".  Some sort of token looking string. 

If I test the Action, it will return the correct value of "Admin"

If I call the Action from a Flow, it return the token looking string.

I have two Flows that use this Action. The thing that drive me crazy is that it works in one flow but not in the other. 

Any help would be appreciated. 

 

4 REPLIES 4

Naveen20
ServiceNow Employee
ServiceNow Employee

Are you calling from a different application scope. That could be the reason.

I am calling within the same application.

Have you ran a /cache.do?

Sometimes older values of properties are stored in the cache.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

No, I have tried that command yet.  

I never thought about resetting cache because that I've never put or change the property value to "{{466544a0-4474-44cc-af79-e9c34c015cc9.defaultMembers}}" in the first place. That is the runtime value returned by the getProperty() call. No error. Just wrong value.