Interface to retrieve record

Hi, I am tasked to do a timesheet POC,

I am asking the user to select the date, and I will using the weeknum function to find out the week number,

after that will add into the database and wait for supervisor approval. 

How to verify the week number is exist in the database record before the user submits the form. 

Please kindly assist me thank you 

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Associate Developer
    in reply to Sunny Yong

    here is the code for adding validation

    {
      a!dateField(
        label: "Date",
        labelPosition: "ABOVE",
        value: ri!date,
        saveInto: {ri!date},
        validations: {if(ri!date>today(),{},"enter a valid date")}
        //if ou have a rule for deciding then
        // validations : if(rule!yourRule(ri!date),{},"not a valid week"
      )
    }

    it will restrict the user from submiting the form untill that field is valid , plus you have to validate the submit button.

Children