When user is taking Yes button action to send mail UI error is popping up saying like below
Expression evaluation error [evaluation ID = 633fa:e25d4] in rule 'em_sendemailconfscreen' (called by rules 'em_receiptregisterform' > 'em_receiptcheck') : An error occurred while executing a save: Expression evaluation error in rule 'em_getemaildata' (called by rule 'm_getsystemstatusincorrectemailbody') at function a!forEach [line 78]: Invalid index: Cannot index property 'payment_no' of type Text into null value of type MV_CHECK_EISM_CASHDATA?list
The block of code where the error pointing out is below: Could you please suggest on this
a!localvariables{ local!isthree:contains( touniformstring(index(ri!eemDetails, "isthree", {})), cons!EM_EVENT_STATUS[1] ), local!prNo: index( index( ri!eemDetails, "pr_no", "" ), 1, "" ), local!untickedIds: if( local!isthree, a!forEach( items: ri!unselectedGridRows.payment_no, expression: if( rule!APN_isBlank(tostring(fv!item)), local!prNo, tostring(fv!item) ) ), {} ), }
Discussion posts and replies are publicly visible
Sure. In line 20, your ri!unselectedGridRows is empty and the dot-notation breaks where there is no data. Use the index() function instead.
https://appian.rocks/2023/11/06/use-the-index-luke/
Dot notations will work fine as long as the property is there and it doesn't contain any value. But when the property is missing, dot notation, definitely, cannot find it hence it breaks. You can either use index() or make sure that your RI is of type CDT or RecordType.
oh got it Sure Stefan will use the index function and will check on it thank you so much for your suggestion
Got it Harshit thank you four suggestion will change to index and check on it