We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

I want to find both a count of and the index values of items in a cdt that are a

I want to find both a count of and the index values of items in a cdt that are a text match of one of many values in a multi-value pv, but I'm having a hard time with this. For instance, my multi-value pv has the values of "ted" and "smith" (these will not always be the same). So, I want to first find the index values of all rows in my cdt where that cdt node equals "ted", and then "smith" I've tried combinations of the where() index() and apply() functions, but it seems like iterating through both the cdt AND the multi-value pv is what is causing me issues. Any assistance, as always, would be greatly appreciated....

OriginalPostID-77464

OriginalPostID-77464

  Discussion posts and replies are publicly visible

  • A start is finding out all of the indices in your cdt that contain a given string (lets use ted). One way of doing this is an expression defined by: rule!stringLocationsInArray=where(apply(rule!nameEqualsName,ri!cdt.column,ri!name)) ... where rule!nameEqualsName is defined by =ri!name1=ri!name2 if this is case insensitive, use exact() if case matters.

    Beyond that, it sounds like you also want to look through the second list of strings to get the indices for ted, smith, etc. Will the number of items in that second list always be the same or will it be variable? If the length is known, you can run this once for each item in the list.

    Do you need to know which indices correspond to ted and which to smith? Or is a list of all indices that have either a ted or a smith sufficient? If the latter is true you can write a third expression that is defined by =apply(rule!stringLocationsInArray,ri!names,ri!array)