I am trying to create path logic using an arcade expression to take a specific answer from an extended property table.
I have tried:
jobExtendedProperty($job,'report_qc_revision','qcpassfail')=="True"
jobExtendedProperty($job,'report_qc_revision','qcpassfail')=='0'
jobExtendedProperty($job,'report_qc_revision','qcpassfail')==0
where the qcpassfail field is a Boolean. They all end up with "No paths match return code". I want to avoid a "Question" step as there are multiple fields for the qc step prior to moving to next step.
The other path logic I require that is failing is where there are 3 options (possibly more in future) that split the workflow. I have tried using a domain and using the same path logic as above, trying to use both the domain code (an integer) and the text value of the domain.
Where am I going wrong?!
I tried to reproduce your issue and could not get a boolean question to work. I tried "True", 'True' and True, as well as "0", '0' and 0 but none worked.
Instead, I created an Extended Property attribute with a domain of user1 and user2 (but you could use a field with Pass and Fail as the values). I tried a branching logic based on the usernames using the following and it routed along the correct path based on the user selection:
Proceed to Step A : jobExtendedProperty($job, 'attributes', 'assignment') == 'user1'
Proceed to Step B: jobExtendedProperty($job, 'attributes', 'assignment') == 'user2'
I am still getting "No Paths Match Return Code"
Here are some screen shots of my process:
The path configuration to move to the next step is:
jobExtendedProperty($job,'report_qc_revision','qcpassfail')=='Pass'
(A fail would move to a different step not pictured above)
The branch split to the various reports can be an AND/OR situation - and may not happen at the same time.
The process would move on and meet up from the report branches after they are loaded.
I feel like I am missing something really small and really annoying . . .
The only thing I can see potentially is that the code for your domain is not the same (e.g. 'yes' vs. 'Yes'). I ran through a test with the following setup:
Then I have an Update Job Properties to select Yes or No for the 2 reports and then configured the paths with the expressions below:
That is successfully routing to either Report 1 Step or Report 2 Step based on selecting Yes for the corresponding job property.
It even works if both are updated to 'Yes':
I hope that helps. Beyond that, I'm at a loss as to what to try next.
We had a very similar problem in directing path logic. I tryed many of the same things as you have, with a similar lack of success.It was a problem with how == >= is interpreted. see rest.
This is my answer to a similar problem see: https://community.esri.com/t5/arcgis-workflow-manager-questions/quot-send-web-request-quot-step-erro...
Here is the explanation from our (esri.australia technical rep Razi Mosadeghi). I have verified that the suggested fixes work
Please find below the explanation they have provided on why Boolean(jobExtendedProperty($job, 'switchtable', 'nerrors')== 0) Does not work:
It appears == 0 returns the string representation of the value here and not the actual value (an integer).
In addition, core Arcade logic is playing a role here as well. In Arcade, the > and < operations will first try to evaluate the result as a string value. If that fails (because you aren't using a string), it will then try to evaluate the result as a integer, which is what we are using here. The == function doesn't have that same logic. It tries to compare a string to a string and then will fail if it can't.
So, if you would like to use == 0 logic, we would need to do either one of the following:
This is my answer to a similar problem