Hi,
am converting all my editable grids from using a!applyComponents() to a!foreach(), What would be the approach for real time use case using for each. Let me know the syntax that would be helpfull. Please find the attached code which am using now.
rows: a!applyComponents( function: rule!KSK_ruleToGenerateGrid( items:ri!cdtPassedtoSaveValues, index: _ ), array: if(or(isnull(ri!cdtPassedtoSaveValues), count(ri!cdtPassedtoSaveValues) < 1), {}, 1+enumerate(count(ri!cdtPassedtoSaveValues))) )
Discussion posts and replies are publicly visible
please check the reference code, in foreach
rows: a!forEach( items: if(or(isnull(ri!cdtPassedtoSaveValues), count(ri!cdtPassedtoSaveValues) < 1), {}, 1+enumerate(count(ri!cdtPassedtoSaveValues))), expression: rule!KSK_ruleToGenerateGrid( items:ri!cdtPassedtoSaveValues, index: fv!index ) )
Shyam Bommakanti Thank you very much shyam.what would you suggest a!applyComponents() vs a!foreach() for generating editable grid.
Considering performance.