How To display blanked mandatory fields name in bottom with mandatory fields being highlighted in red in interface

we have a requirement, where the user wants to see all the mandatory fields names, that is still blank at the bottom of the interface and also wanted to see the existing functionality of Appian, where while submitting the form, all mandatory fields are highlighted in red.

we have 6-7 UI, managed in a single interface, with the help of links, so we have achieved to display the blank out field names at the bottom of the interface, but now the Appian default functionality for highlighting the fields in red is not working.

I have used my expression rule to display the names of fields at the submit (boolean)function in the button field, so instead of directly mapping submit as true, we are checking our expression to check whether any field is still blank, if it is then displaying the names at the bottom of the interface.

so now, the only issue, we are facing here is, on the click of the submit button, the by default function to highlight the fields is not working,

Please let us know if anyone know the workaround

  Discussion posts and replies are publicly visible

Parents
  • I think it would help to share your SAIL expression. Usually validations are pretty straightforward: they trigger when (1) you have a submit button that has validate=true and (2) there is a validation error in the field (either the value is null when the field is required or the validations parameter returns a text string to display).

    Often issues with validations are due to the first item above - do you have your submit button set to validate?

  • so here is a sample code:

    button:

    a!buttonWidget(
    label: cons!PC_SUBMIT_BUTTON_LABEL,
    value: cons!PC_SUBMIT_BUTTON_LABEL,
    saveInto: ri!buttonVal,
    submit: rule!PC_ValidateRequiredFields(
    instSegAttribute: ri!instSegAttribute,
    instSegAttribute1: ri!instSegAttribute1,
    instSegAttribute2: ri!instSegAttribute2,
    instSegAttribute3: ri!instSegAttribute3
    )
    )

    PC_ValidateRequiredFields:

    f(
    or(
    rule!APN_isBlank(
    ri!instSegAttribute.field1
    ),
    rule!APN_isBlank(
    ri!instSegAttribute.field2
    )
    ),
    false,
    true
    )

    also, the fields are marked mandatory i.e required is set as true

Reply
  • so here is a sample code:

    button:

    a!buttonWidget(
    label: cons!PC_SUBMIT_BUTTON_LABEL,
    value: cons!PC_SUBMIT_BUTTON_LABEL,
    saveInto: ri!buttonVal,
    submit: rule!PC_ValidateRequiredFields(
    instSegAttribute: ri!instSegAttribute,
    instSegAttribute1: ri!instSegAttribute1,
    instSegAttribute2: ri!instSegAttribute2,
    instSegAttribute3: ri!instSegAttribute3
    )
    )

    PC_ValidateRequiredFields:

    f(
    or(
    rule!APN_isBlank(
    ri!instSegAttribute.field1
    ),
    rule!APN_isBlank(
    ri!instSegAttribute.field2
    )
    ),
    false,
    true
    )

    also, the fields are marked mandatory i.e required is set as true

Children
No Data