Hi everyone, I'm having this issue where I'm trying to index a date and time array using the index of caseID from another array with same order. Below are the process variables and the code that I wrote:
However there was no updatedDateTime value passed into my sub-process, so I'm wondering what did I do wrong with the indexing.
Any idea? Thanks a lot in advance :)
Discussion posts and replies are publicly visible
With seeing the data its impossible to say anything. I recommend to not "hide" such logic inside the value assignment, but use a separate script task and store the result in a PV. That make debugging also a lot easier.
I want to find datetime for each casesWithTask then pass that value into my sub-process. Not sure if tp!instanceIndex can be used in scriptask?
I created a scriptask and tried index(pv!updatedDateTime,wherecontains(pv![a case ID instead of pv!casesWithTask[tp!instanceindex],pv!allCases),null), this will return me the exact date time at that index. But it does not work with tp!instanceIndex not sure why...
I understand. But almost impossible to debug. Maybe you want to create an expression that creates a list of maps containing the required data that you then pass to your sub processes.
The input variable type for sub-process is Date and Time, so when I index from Map, the value cannot be passed into sub-process due to data type mismatch...
If you need to just pass a single value, then go with this and skip the map. I just wanted to give you an idea of how to approach that situation in a different way.