How to apply validations on a!pickerfieldrecord?

Hello there,

I am using a!pickerfieldrecord function under search filters to return data. I am applying this on integer field where user can apply multiple filter like 123456,5746875,59867578695,948647 etc at a time.

I want to apply a condition while searching that, user should enter 9 digits or atleast 9 digits in order for the search to work.

How can i achieve that, i dont want to apply queryfilter as that is not helping the requirement.

Added sample code, please suggest if that can be customized!!

 a!localVariables(
   local!number:{},
   local!isLoanNoValid: if(
     len(local!number) < 9,
     true,
     false
   ),
   a!columnLayout(
     contents:{
       a!pickerFieldRecords(
     label: "Number",
     labelPosition: "COLLAPSED",
     maxSelections: 10,
     /*placeholder: "Please enter 9 digits inorder to start search",*/
     recordType:cons!PAA_record_type,
     value: local!number,
     validations: if(isnull(local!number),
     null,
     if(local!isLoanNoValid,"Please sprovide 9 digit number",{})
     ),
     saveInto:{}
   )
   }
 )
 )

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data