Skip to main content
Known Participant
Jan 26, 2022 6:49 PM UTC
Question

How to allow record to accept null variables

Currently getting the error below

Error Evaluating UI Expression

Expression evaluation error at function a!gridField [line 29]: A grid component [label="null"] has an invalid value for "columns". A grid column [label="Team Lead"] has encountered an error. Expression evaluation error at function 'user' [line 29]: Null argument not allowed

any ideas on how to solve this issue

    4 replies

    stefanhelzle0001
    Brainy
    Jan 26, 2022 7:02 PM UTC

    Sure. You will need to wrap the user() function into a isnull() check

    if(isnull( value ), "--", user(value))

    Known Participant
    Jan 26, 2022 8:22 PM UTC

    Thinking this is what you mean? 

    if(isnull("--"),"--",user(fv!row['recordType!OCSC Nonclinical Service Tracking Entry.fields.{team_lead}team_lead'], "firstName") & " " & user(fv!row['recordType!OCSC Nonclinical Service Tracking Entry.fields.{team_lead}team_lead'], "lastName"))

    stefanhelzle0001
    Brainy
    Jan 26, 2022 8:25 PM UTC

    That would make no sense. Try this.

    if(
      isnull(fv!row['recordType!OCSC Nonclinical Service Tracking Entry.fields.{team_lead}team_lead']),
      "--",
      user(fv!row['recordType!OCSC Nonclinical Service Tracking Entry.fields.{team_lead}team_lead'], "firstName")
      & " "
      & user(fv!row['recordType!OCSC Nonclinical Service Tracking Entry.fields.{team_lead}team_lead'], "lastName")
    )