- I have a form, with a repeating section shown below. The form will be sent to Approver 1 if any of the Markets is Argentina, Chile or Peru, and Approver 2 if any of the Markets is Colombia or Mexico.
- I want to validate e.g the Units Available control(s) in the Argentina, Chile and/ or Peru repeating sections when the form is with Approver 1, and likewise for Units Available control(s) in Colombia or Mexico repeating sections for Approver 2.
- In turn, I do not want validation on Units Available control(s) in Columbia or Mexico repeating sections when the form is with Approver 1, and vice versa.
- I have put a Calculated Field in the repeating section with the formula: currentRowNumber(UnitsAvailable)-1 (this value is shown as 0, above "GVS" in the screengrab)
- The formula I have used for the Units Available validation (where Current Position == 2 for Approver 1, and MarketLATAM is the name of the Market control) is: isNullOrEmpty(UnitsAvailablelcalcRow])&&(MarketLATAMAcalcRow]=="Argentina"||MarketLATAMAcalcRow]=="Chile"||MarketLATAMAcalcRow]=="Peru")&&Current Position==2)
- My thought is that this should result in e.g. for the first repeating section: isNullOrEmpty(UnitsAvailablea0])&&(MarketLATAMA0]=="Argentina"||MarketLATAMA0]=="Chile"||MarketLATAMA0]=="Peru")&&Current Position==2), or, if the Units Available control for repeating section 0 is empty and the market for repeating section 0 is Argentina, Chile or Peru and the current position is 2 then validate.
- However, this formula doesn't work, either using the calcRow value in #5 above, or just using "0" in #6 above - where am I going wrong?