Hi,
I am parcticing with the a!queryRecordType() function and I realized in return one field called identifiers where the primiary key is returned and I would like to know if I could transform it together with the data field into a map where the identifiers values are the keys and the data values are the values.
For example:
Having:
identifiers : {12,20}
data : {"first value", "second value"}
Transform it into
{12: "first value",
20: "second value}
Discussion posts and replies are publicly visible
Hello antoniochl,
Please refer the below code. I hope this will help.
a!localVariables( local!identifiers: { 12, 20 }, local!data: { "first value", "second value" }, { append( a!forEach( items: local!identifiers, expression: concat( fv!item, ": ", index(local!data, fv!index, null) ) ) ) } )
can you also try this,
a!localVariables( local!identifiers: { 12, 20 }, local!data: { "first value", "second value" }, { a!flatten( a!forEach( items: local!identifiers, expression: { a!map( identifier:fv!item, data:index(local!data,fv!index,null) ) } ) ) } )
thank you for your answer, it´s almost what I want but it returns a List of Map and I would like a single Map containing all the data is there any posibilitiy to join them.
Thanks again.