Hi,
I have tested this functionality based on your description and it worked as expected. What browser are you using?
I am using Chrome Version 78.0.3904.108.
I'll add a little more clarification:
I am looking up a value from a reference list. The http request returns just fine, returing a boolean false in the json data. Because the Nintext lookup function only returns a string value, my text variable gets assigned a string value of "false". For debugging, I'm displaying this on the form in a label control to verify that I'm getting the correct value, and I am.
The rule is set such that if this variable has a value equal to "false", then a field on my control will be disabled (readonly = true).
The control only ends up being disabled if I substitute in the same rule a "dummy" text variable that I assign a literal value of "false", rather than using the lookup for the assignment.
As soon as I switch back to the actual variable that is assigned based on the lookup, the rule does not work (the control is not disabled), even though it has exactly the same value of "false".
I found extracting the value from a List Lookup control takes some extra logic because parseLookup with true doesn't handle the unselected case as expected. (I have a case about this).
In the meantime this works for me:
1) create a text form variable, say called SiteLookupValue, that extracts the selected value from a ListLookup control. The formula/value is:
ifElse(contains(substring(Form.SiteLookup,2,1),"#")
,substring(Form.SiteLookup,3,255),
ifElse(contains(substring(Form.SiteLookup,3,1),"#")
,substring(Form.SiteLookup,4,255)
,substring(Form.SiteLookup,5,255)
)
)
2) create a rule as follows:
if SiteLookupValue equals YourSpecificValue
then YourControl Read-only Yes
else YourControl Read-only No
So, I'm not "extracting the value from a List Lookup Control".
I have a variable that is assigned a value using the lookup function to get the value from a Sharepoint List. Presumably, this list lookup (http request to Sharepoint API and the server response) and value assignment happens on page / form load.
The value of this variable is as expected, and is displayed on the form for debugging, but the behavior of the target control for the rule appears to indicate that the variable might not be set at the time the rule is evaluated.
Hi @v-tmasenko,
Any update on your case about this issue?
I'm experiencing this problem as well and it's kinda hurting us for a PoC we're trying to show a customer.
I tried your workaround (which basically takes the text after the #, as long as you don't have more than 99 entries in the lookup list), but this also gives me no result when putting it in a variable and then mapping the variable to another field value.
My requirement is so simple; I just want the value on the input form to match an entry on another SharePoint list, but it look like I'll have to go the not-so-user-friendly way of doing stuff in workflow after the user manually typed in the value :smileyfrustrated:
Never mind; the parseLookup() actually works, just not in "Preview" when you're designing the form:
Yes it was fixed in one of the recent updates.
So the work-around I posted is redundant.