This content has been marked as final. Show 3 replies
I dont want to avoid duplicate. I form will have duplicate but during runtime at the form level how to loop through record and find if same record is present ?
- create an on-checkbox-changed trigger of active/inactive field.
- in that trigger create a timer that expires in 1 ms and does not repeat.
- in when timer expired trigger , get the current customer id , current row number and declare two additional variables that will counts total rows of that customer and total inactive
- go to first row of that block and start a loop of total rows of that block
- in each loop iteration match if customer it is same then add +1 in totalrowsofcustomer and also check if order is active or inactive, and count them too.
- then when loop finishes, check totalrowsofcustomer and InactiveRowsOfCustomer
- if inactiverowsofcustomer is less than totalrowsofcustomer then return true and use go record (rownumber) to return to same row in that block
- else, raise an error that you can not inactive all orders of one customer.
hope this helps!