Skip to main content
Known Participant
Sep 21, 2022 1:38 PM UTC
Question

Fields configuration

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
    Brainy
    Sep 21, 2022 1:43 PM UTC

    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
    Brainy
    Sep 21, 2022 1:44 PM UTC

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

    Known Participant
    Sep 21, 2022 2:03 PM UTC

    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