Skip to main content
January 26, 2024
Question

Getting UI Error saying cannot index property of type text into null value if type list

  • January 26, 2024
  • 4 replies
  • 0 views

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)
)
),
{}
),

}

4 replies

stefanhelzle0001
Brainy
January 26, 2024

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/

January 26, 2024

oh got it Sure Stefan will use the index function and will check on it thank you so much for your suggestion

harshitb6843
January 26, 2024

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. 

January 26, 2024

Got it Harshit thank you four suggestion will change to index and check on it