Hi,I'm currently working on an interface with a checkbox with multiple value

Hi,I'm currently working on an interface with a checkbox with multiple values ac is already set to Text and checked as array and my sail code is:

a!checkboxField(
label: "Document Check List",
choiceLabels: cons!CONS_documents,
choiceValues: cons!CONS_documents,
value: ri!compliance_missingDocs,
saveInto: ri!compliance_missingDocs,
required: if(ri!status="For Compliance-Incomplete Documents",true(),false())
)

Problem is I keep on getting this error (please see attached). Also code seem to run fine when I created it on interface. Please let me know if I missing something. TIA

OriginalPostID-145508

OriginalPostID-145508

  Discussion posts and replies are publicly visible

Parents
  • Hi jessicae Try using the below snippet

    a!checkboxField(
    label: "Document Check List",
    choiceLabels: cons!CONS_documents,
    choiceValues: cons!CONS_documents,
    value: if(rule!APN_isEmpty(ri!compliance_missingDocs),null,ri!compliance_missingDocs),
    saveInto: ri!compliance_missingDocs,
    required: if(ri!status="For Compliance-Incomplete Documents",true(),false())
    )

    Added to above, could you please let me know the data type and value of ri!compliance_missingDocs?
Reply
  • Hi jessicae Try using the below snippet

    a!checkboxField(
    label: "Document Check List",
    choiceLabels: cons!CONS_documents,
    choiceValues: cons!CONS_documents,
    value: if(rule!APN_isEmpty(ri!compliance_missingDocs),null,ri!compliance_missingDocs),
    saveInto: ri!compliance_missingDocs,
    required: if(ri!status="For Compliance-Incomplete Documents",true(),false())
    )

    Added to above, could you please let me know the data type and value of ri!compliance_missingDocs?
Children
No Data