Skip to main content
March 17, 2022
Question

Error- at function a!textField :invalidindex:Cannot index property(UZCd of type string into type list of variant

  • March 17, 2022
  • 6 replies
  • 0 views

I am facing this error in UI when m trying to modify the UZ. Code which I used is below:

a!localvariable(
 with(
    local!uzReadOnly: rule!TM_QR_getListUzById(UzIds:ri!formReportableSegment.UzId),
  
   a!sectionLayout(
    label: " Details",
    columns:{
     
     a!textField(
      label: "UZ",
      labelPosition: "ADJACENT",
      value: local!uzReadOnly.UzCd & " - " & local!uzaReadOnly.UzName,
      readOnly: true
     )},

I tried indexing it  but still throwing same error.

    6 replies

    andrewh0007
    March 17, 2022

    Is UzCd an array? Can you show us what the local!uzReadOnly returns and if it's a CDT the CDT info?

    March 17, 2022

    this rule :rule!TM_QR_getListUzById(UzIds:ri!formReportableSegment.UzId) , the UzIds is an array.

    harshitb6843
    March 18, 2022

    Hi there,

    Here is some sincere advice. Please AVOID using the [dot] operator. It causes a lot of trouble when you don't get the expected value in the variable. 
    Instead, use index() or property() function. Your error should be resolved. 

    March 18, 2022

    Thanks, it resolved .Indexing didnt worked somehow but property() function worked.