I am having a terrible time trying to use an account attribute to define a variable.
Specifically, I am trying to create an ITSM ticket to have the manager of a non-employee certify that the account is still needed or not. There is an attribute on the non-employee account called duration that is the number of months that the manager initially requested for them. We would like to use that number to suggest a new end date. I thought I could pull the attribute with the following string $.getAccounts.accounts[?(@.sourceId==‘2c9180868019802901801f59b5ef1c7d’)].attributes.duration
The expression:$.getAccounts.accounts[?(@.sourceId==‘2c9180868019802901801f59b5ef1c7d’)].attributes.duration to fetch the account attribute is correct. I have tried a similar one and it works for me. Just two things to ensure here:
The value fetched in variableA i.e. identity attribute endDate is a date (not a string) in IS8601 format. (YYY-MM-DD “T” hh:mm:ss.SSSZ)
The value fetched from account attribute duration is a number/integer, not a string.
Ah, the duration field is a string! That must be the issue then. Is there any way I can transform that value to a number/integer from string other than changing the account schema?