Hi to everyone, I've read the guide to sail for designer and the vario

Hi to everyone,
I've read the guide to sail for designer and the various section for using dynamic data, but I can't replicate this form.
The Requestor Field has a default value from a multiple CDT, the other field are all required and is necessary to pick up the date by clicking on the calendar.
In addition there are two hide field that will appear only when the start date is previous to today() and when the end date is previous to the start day
...

OriginalPostID-133278

OriginalPostID-133278

  Discussion posts and replies are publicly visible

  • Which part do you think is not replicable? You can use the if() expression to display the hidden fields based on the values selected in the start and end date. You can validate against the value on which the start and end dates are stored into. They can either be a rule input or a local variable.
    Let me know if this addresses your requirement?
  • yes the problem is how to use the if function in a sail form to hide or to show some field. I've tried with this:
    =a!formLayout(
    label: "Untitled",
    instructions: "Please fill in the form below",
    firstColumnContents: {
    if(ri!test, a!textField(label: "Error Message", readOnly: true, value: "The Start Date cannot be before today"), a!textField(label: "Error Message", readOnly: true, disabled: true, value: "The Start Date cannot be befor today")),
    },
    buttons: a!buttonLayout(
    primaryButtons: a!buttonWidgetSubmit(
    label: "Submit",
    style: "PRIMARY"
    )
    )
    )
    where the rule input test is a boolean.
    But it doesn't work
  • That SAIL works fine, though you've got an extra comma after the if() condition that you don't need.