Crow Canyon Software Forum
Advanced Conditions - it's a mystery
Quote from ACR-SCOUT on January 30, 2021, 6:11 pmDoes anyone else find the Advanced Condition feature a mystery?
I get the idea that you are evaluating a direct A=B with one condition on the left side of the double commas ",," but what I do not get is the correct syntax.
I have some instruction that use terms like "field placeholder" but is that the [External Name|Internal Name] placeholder? Or is it just the internal name.
Also some instructions seem to indicate that you can choose the value type but does not give a list of available value types. For example if you were to compare a variable date with a field in the list is it $parsefieldvalue(myVariable##Value, Value) or is it $parsfieldvalue(myVariable##Value,datetime). Furthering the confusion, why is it "parseFIELDvalue" when you are parsing a variable?
I code in VB, VBA, Powershell, some .Net, and some JavaScript, and this has be absolutely baffled.
Article https://www.crowcanyon.help/article/459/ is frequently referenced as an example but it only provides for variable comparisons.
For example, here is one of the conditions Advanced Condition:
$parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L1Approver)
Why does one have "string" and the other does not?
I hope to start a good discussion here that will provide a list of quality examples.
Does anyone else find the Advanced Condition feature a mystery?
I get the idea that you are evaluating a direct A=B with one condition on the left side of the double commas ",," but what I do not get is the correct syntax.
I have some instruction that use terms like "field placeholder" but is that the [External Name|Internal Name] placeholder? Or is it just the internal name.
Also some instructions seem to indicate that you can choose the value type but does not give a list of available value types. For example if you were to compare a variable date with a field in the list is it $parsefieldvalue(myVariable##Value, Value) or is it $parsfieldvalue(myVariable##Value,datetime). Furthering the confusion, why is it "parseFIELDvalue" when you are parsing a variable?
I code in VB, VBA, Powershell, some .Net, and some JavaScript, and this has be absolutely baffled.
Article https://www.crowcanyon.help/article/459/ is frequently referenced as an example but it only provides for variable comparisons.
For example, here is one of the conditions Advanced Condition: $parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L1Approver)
Why does one have "string" and the other does not?
I hope to start a good discussion here that will provide a list of quality examples.
Quote from James Restivo on February 5, 2021, 1:38 pmHello ACR-SCOUT, This is great feedback. We are enhancing our documentation to better illustrate when and where to use particular functions and syntax. I will also be conducting a webinar on April 7th to go over syntax in NITRO in detail: https://attendee.gotowebinar.com/register/3207246144155035915
I have some instruction that use terms like "field placeholder" but is that the [External Name|Internal Name] placeholder? Or is it just the internal name.
For this it depends on where you're putting the placeholder. If you are comparing to a column value on the form, you'd use %%[External Name|InternalName]%% to reference the column value on the form. That's going to be the case most of the time (with the %%[|]%% syntax used in the condition builder; the reason being that the condition builder is always looking for a literal string until you tell it otherwise).
If you're getting the info from another action (such as Create Item) or Query List action, you'd use ActionName##InternalName.
For example if you were to compare a variable date with a field in the list is it $parsefieldvalue(myVariable##Value, Value) or is it $parsfieldvalue(myVariable##Value,datetime).
In this case, you'd specify the type of data that is in the variable, e.g. "String" for when it is a literal string of text, "DateSite", when it is a date, etc.
For example, here is one of the conditions Advanced Condition:
$parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L1Approver)
Why does one have "string" and the other does not?
Since the variable could be any type of data, we need to specify what type of data we're looking for from that variable, in this case a literal string. $parsefieldvalue(QL_Approver Definition##L1Approver) doesn't need the second argument because the Custom Action knows what type of field L1Approver is (a Person or Group field in this case).
I'm going to move this to the Custom Actions topic.
Hello ACR-SCOUT, This is great feedback. We are enhancing our documentation to better illustrate when and where to use particular functions and syntax. I will also be conducting a webinar on April 7th to go over syntax in NITRO in detail: https://attendee.gotowebinar.com/register/3207246144155035915
I have some instruction that use terms like "field placeholder" but is that the [External Name|Internal Name] placeholder? Or is it just the internal name.
For this it depends on where you're putting the placeholder. If you are comparing to a column value on the form, you'd use %%[External Name|InternalName]%% to reference the column value on the form. That's going to be the case most of the time (with the %%[|]%% syntax used in the condition builder; the reason being that the condition builder is always looking for a literal string until you tell it otherwise).
If you're getting the info from another action (such as Create Item) or Query List action, you'd use ActionName##InternalName.
For example if you were to compare a variable date with a field in the list is it $parsefieldvalue(myVariable##Value, Value) or is it $parsfieldvalue(myVariable##Value,datetime).
In this case, you'd specify the type of data that is in the variable, e.g. "String" for when it is a literal string of text, "DateSite", when it is a date, etc.
For example, here is one of the conditions Advanced Condition:
$parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L1Approver)
Why does one have "string" and the other does not?
Since the variable could be any type of data, we need to specify what type of data we're looking for from that variable, in this case a literal string. $parsefieldvalue(QL_Approver Definition##L1Approver) doesn't need the second argument because the Custom Action knows what type of field L1Approver is (a Person or Group field in this case).
I'm going to move this to the Custom Actions topic.
Quote from James Restivo on April 1, 2021, 12:10 pmTo update this, we published three articles to help unravel the "hows" and "wheres" of syntax:
Forms syntax: Syntax for expressions in NITRO Forms – Crow Canyon Software Support
Workflows syntax: Syntax for Expressions in NITRO Workflows – Crow Canyon Software Support
Custom Actions Syntax: Syntax for Expressions in Custom Actions – Crow Canyon Software Support
We will put together more documentation on the functions as well.
To update this, we published three articles to help unravel the "hows" and "wheres" of syntax:
Forms syntax: Syntax for expressions in NITRO Forms – Crow Canyon Software Support
Workflows syntax: Syntax for Expressions in NITRO Workflows – Crow Canyon Software Support
Custom Actions Syntax: Syntax for Expressions in Custom Actions – Crow Canyon Software Support
We will put together more documentation on the functions as well.
Quote from Coleman Sleeper on July 23, 2024, 8:36 amHello. I know this is an old post, but I was looking for some clarification. I read the articles noted below, but couldn't find the answer.
Regarding the syntax of variables in Advanced Conditions: What data types (Values) can I assign them? I see string and datetime. Does the type set the data type for the variable or does it just identify it?
A more specific question about this: I have a column value ABC-1234-YY. I set a variable by using regex to pull the 4 digits 1234. Can I use this variable as a number in Advanced Conditions and compare it to another number? E.G. 1000,,$parsefieldvalue(count#Value, type)? What type do I use there?
Lastly, this may have already been decided but the nomenclature $parsefieldvalue(myVariable##Value, Value) seems confusing to me. Would $parsefieldvalue(myVariable##Value, Type) work better?
Hello. I know this is an old post, but I was looking for some clarification. I read the articles noted below, but couldn't find the answer.
Regarding the syntax of variables in Advanced Conditions: What data types (Values) can I assign them? I see string and datetime. Does the type set the data type for the variable or does it just identify it?
A more specific question about this: I have a column value ABC-1234-YY. I set a variable by using regex to pull the 4 digits 1234. Can I use this variable as a number in Advanced Conditions and compare it to another number? E.G. 1000,,$parsefieldvalue(count#Value, type)? What type do I use there?
Lastly, this may have already been decided but the nomenclature $parsefieldvalue(myVariable##Value, Value) seems confusing to me. Would $parsefieldvalue(myVariable##Value, Type) work better?
Quote from supportTeam on August 12, 2024, 10:29 amHi,
Parse field value function is not required to fetch value from variables. We can directly use syntax "variablename##Value".
To compare the number values in advanced condition, please pass third parameter 'number'.
Syntax: Column placeholder/variable value,,Column placeholder/variable value,,number
Ex: varCount##Value,,1000,,number
Please note that last parameter "number" is fixed for comparing number type columns in the advanced condition.
Hi,
Parse field value function is not required to fetch value from variables. We can directly use syntax "variablename##Value".
To compare the number values in advanced condition, please pass third parameter 'number'.
Syntax: Column placeholder/variable value,,Column placeholder/variable value,,number
Ex: varCount##Value,,1000,,number
Please note that last parameter "number" is fixed for comparing number type columns in the advanced condition.