I would like know if there exists some documentation on this type of syntax: [This#Form]? I notice a few responders on this community use these syntax's yet I can never find them when searching through the help guide or community kb's. Perhaps i'm not using the search correctly. Or is the use of these syntax and how they work a secret?
I'm not sure if they show up anywhere else in HEAT, but in Request Offering when adding one of the form fields to an expression, the system automatically adds them in.
For example, below is the 'Default Value' section of a Text Area field within my Request Offering form. By double clicking on a field from the right (i.e. Start Date, First name), it will show up on the left side with "[This#Form]StartDate" or "[This#Form]Firstname". (see below. I added one calls Applications and it shows up as "[This#Form]Applications".
1 of 1 people found this helpful
You can use the Find() function in your expression to do what you need.
I created a List called Application:
I create a List called Options:
I set the Visibility Expression on Options to:
if Find("TS2", Applications) != -1 then true else false
When I go to the Service Catalog and open the Request Offering, the Options list is not visible. If I select TS1 it's still not visible, ...
...but when I select TS2 it becomes visible.
Hope this helps!
We tried this and it resulted in an error upon opening previewing the form.
Error: "unexpected function name in expression: Find"
The version of HEAT we use is 2014.3.1001.10 @ 1/7/2015, if that helps. We don't have support, so looking for any way possible that doesn't require a 'function' to be used. :s
What version of ISM (HEAT SM) are you running?
I have a feeling that new commands were added for Request Offering expressions in 2016.x. Terry is probably testing in the latest release 2017.1.1 or 2016.2.x
Post you workings if possible so we can try to help.
The version is 2014.3.1001.10 @ 1/7/2015.
This is a Validation List. We pull from a pick list called 'Applications_List', which has 2 constraints. The Client must be selected to populate the Role, then the Role is selected to populate the Applications.
This works without any issues.
Text Area 6:This is a text field used for Option List's visibility expression. This text area field is triggered by 'Applications' and the value is whatever is selected, in the order it is selected.
For example, if we select TS1, TS3, TS2 in the Applications field, then it would show in the text area as TS1~^TS3~^TS2.
This works only if TS2 is the only option selected. If you select more then it disappears because it no longer equals TS2.
This doesn't work when pointing to Applications, which is why we added the text area.
1. Select the Client
2. Select the Role
3. Select a few of the now listed applications, and they show up in that order on the Text Area 6. The Options List field doesn't show up unless only TS2 is selected.
If using the expression Terry provided, it results in the error below.
1 of 1 people found this helpful
The newer functions (including Find) will not work in 2014.3, can you upgrade to a newer version? (on a side note I would recommend it given that the upgrades are incremental it could be a big job if you leave it too long as we are now on 2017.1.1.)
I will see if I can find anything in my notes but here is the original thread discussing this functionality: Multi-Select (List) fields in Service Requests
The only option I can think of is a multi line if statement:
if [This#Form]List1 == 'TS2' then true else
if This#Form]List1 == 'TS1~^TS2' then true else
if This#Form]List1 == 'TS1~^TS2#^TS3' then true else....etc.
But that will get messy if you have more than a few options.