I have a CDT which can contain an array of product information and a Constant wh

I have a CDT which can contain an array of product information and a Constant which contains specific product codes. In my user interface, I can display a specific piece of text where the value of CDT.fieldname = cons!value, however it only works if the Constant contains a single value. How can I perform a match where there are multiple values in the constant. In my form, I have the following:

if(
index(
ri!ItemList,
"productCode",
""
) = cons!MY_SOFTWARECODE,
a!paragraphField(
value: "This product licence is perpetual.",
readOnly: true
),
a!paragraphField(
value: "No match.",
readOnly: true
)
)

The CDT ItemList contains the fields productCode, productName, price.

The constant contains the values Word123,Excel123

As the user is filling the form and picks a product that mat...

OriginalPostID-203840

OriginalPostID-203840

  Discussion posts and replies are publicly visible

Parents
  • Hi siddharthg837,

    I don't think I explained my example clearly enough. My Constant contains a series of product codes which in this case all relate to versions of the same product. In my application, the software code could match any one of the codes in the Constant, so I have to check each member of the array and can't reference a specific member e.g. [2]. I'm probably over-engineering this in my mind, but I was thinking something along the lines of finding the length of the Constant array and then looping through each value to see if there is a match.
Reply
  • Hi siddharthg837,

    I don't think I explained my example clearly enough. My Constant contains a series of product codes which in this case all relate to versions of the same product. In my application, the software code could match any one of the codes in the Constant, so I have to check each member of the array and can't reference a specific member e.g. [2]. I'm probably over-engineering this in my mind, but I was thinking something along the lines of finding the length of the Constant array and then looping through each value to see if there is a match.
Children
No Data