cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

make a field required based on value in another field within repeating section

Hi

 

I have a repeating section in my travel form with the following fields.

 

Date

Kilometres

Value

Cost codes

 

Where if the date is entered,  i need a rule to ensure all the remaining fields within the repeating section become mandatory.

 

can anyone help?

Labels: (2)
Tags (1)
0 Kudos
Reply
5 Replies
Not applicable

Re: make a field required based on value in another field within repeating section

For each of the three fields(except date) put following rule: not(isNullOrEmpty(Date)) and set the Rule Type as "Validation".

This rule will ensure that if Date is empty, the controls are not validated. This should work. All the best.

0 Kudos
Accept as Solution Reply
Not applicable

Re: make a field required based on value in another field within repeating section

Thanks Ratnesh

I have added the validation rule which does seem to validate by highlighting the required fields and displaying the message i specified in the rule, but... when i press the save/submit button the form does not save and just remains on the screen with the required fields highlighted...

any ideas?

0 Kudos
Accept as Solution Reply
Not applicable

Re: make a field required based on value in another field within repeating section

I tried and came up with the new rule. The issue with the old one was that it was not validating the text boxes themselves. This new rule should work:

 

not(isNullOrEmpty(datetemp)) && isNullOrEmpty({Self}).

0 Kudos
Accept as Solution Reply
Not applicable

Re: make a field required based on value in another field within repeating section

Thanks so much, works a treat!

0 Kudos
Accept as Solution Reply
Not applicable

Re: make a field required based on value in another field within repeating section

I'm glad it worked out for you!

0 Kudos
Accept as Solution Reply