Skip to main content
September 21, 2022
Question

Fields configuration

  • September 21, 2022
  • 4 replies
  • 0 views

I have requirement where i have a interface in which I have two fields let's say "error" and "error type"

And also I have the below fields,

Personal details (section header)                

Name - jack                                

Last name - rayan                      

Mailid - blank

Then the result should be,

Error          - personal details

Error type - mailid

    4 replies

    harshitb6843
    September 21, 2022

    You can create a map where you have the section, fieldLabel and the fieldValue both defined in different keys and can iterate through that map when the button is clicked to see if it had a value. If not, you can use fv!item.fieldLabel to display the Error type and do the same for Error 

    harshitb6843
    September 21, 2022

    Somewhat like this

    {
      a!map(
        section: "Personal details",
        field: "First Name",
        value: ri!personalDetails.firstName
      ),
      a!map(
        section: "Personal details",
        field: "Last Name",
        value: ri!personalDetails.lastName
      ),
      a!map(
        section: "Personal details",
        field: "Email Id",
        value: ri!personalDetails.email
      )
    }

    September 21, 2022

    Sey that was not section it was created in card layout where I used a rich text as "personal details" does it work with the same