How do I use an or in the "Hide If" data bindings section for a field?
I want to hide if the value is blank or doesn't exist.
so
/mvc:eForm/mvc :D ata/WorkitemContext/Process/ProcessVariables/myvalue[.='']
or
not(/mvc:eForm/mvc :D ata/WorkitemContext/Process/ProcessVariables/myvalue)
I want to hide if the value is blank or doesn't exist.
so
/mvc:eForm/mvc :D ata/WorkitemContext/Process/ProcessVariables/myvalue[.='']
or
not(/mvc:eForm/mvc :D ata/WorkitemContext/Process/ProcessVariables/myvalue)
RE: Visibility Details - Hide If
/mvc:eForm/mvc :D ata/WorkitemContext/Process/ProcessVariables[not(myvalue) or (myvalue = '')]
This assumes that the ProcessVariables element will always exist, which should be the case.
(If you were looking at different data, and couldn't guarantee that the parent element will be there, then you would need to move the predicate higher up the XPath, to find the element that will always be present.)
It is also possible to use XPaths that check completely different bits of data, but you need to remember to put brackets around the options, eg:
(/first/xpath/check or /second/xpath/check)
I hope this helps.
RE: Visibility Details - Hide If
I had it checking for the value first. WM does not like this syntax instead use
not(/mvc:eForm/mvc :D ata/WorkitemContext/Process/ProcessVariables/myvalue)
or
/mvc:eForm/mvc :D ata/WorkitemContext/Process/ProcessVariables/myvalue[.=''][hr][/hr]
The process variable doesn't always exist as it was common code used across various Bizflow processes which was the problem.
thanks
RE: Visibility Details - Hide If
It's interesting that the ordering made a difference for you.
I think you should find that if you put the brackets around the whole check though it will work regardless of the order.[hr][/hr]
I think the ProcessVariables element will always be present for Bizflow WebMaker applications even if the particular PV doesn't exist, so this original format should be ok.
An alternative option is to use an XPath like:
not(/mvc:eForm/mvc :D ata/WorkitemContext/Process/ProcessVariables/myvalue[. != ''])
Which does not place any restrictions on any elements being present, but is slightly trickier to read because of the double negative. This will only give false if the myvalue element is present and has a value.
The XPath syntax gives you quite a few different ways of implementing these types of checks. :)
RE: Visibility Details - Hide If
I think I tried the brackets as i was getting desperate and I don't think they worked.