Community

Can we calculate total amount in each section individually and put a validation condition in delivery section(mandatory) if any of the days selected order amount is less than 10$ then add more

PRASAD SAMANT

Jul 4, 2024

Comments (7)

Vipin

Jul 4, 2024

Calculate section order quantity You can use the QUANTITYIN() function to calculate the order quantity for the products in a section. To calculate the order quantity for the products in the Monday section, add a short answer question with QUANTITYIN("Monday") formula in the Monday section. Instructions below. Login to Neartail > click on the form to open it > Edit page will be displayed > In the Neartail Edit page, click on the + icon to add a question > enter the title "Monday Order Quantity", select the short answer question type > click on the gear icon for this question > Question settings page will be displayed > click Answer > enter the QUANTITYIN("Monday") formula in the Calculate option and click Save. Calculate minimum order amount The minimum order amount of $10 must be enforced only if the user chooses to order items for that day (Monday section). Otherwise, the user should be able to click Next to proceed to the next section without selecting any products in the Monday section. We can use the IFS function to check the order quantity and set the minimum order amount. In the Neartail Edit page, click on the + icon to add a question > enter the title "Monday Min Order Amount", select the short answer question type > click on the gear icon for this question > Question settings page will be displayed > click Answer > enter the IFS(Monday Order Quantity > 0, 10, 0) formula in the Calculate option and click Save. Calculate section order amount You can use the TOTALIN() function to calculate the amount for the products selected in a section. To calculate the order amount for the Monday section, add a short answer question with TOTALIN("Monday") formula in the Monday section. Instructions below. In the Neartail Edit page, click on the + icon to add a question > enter the title "Monday Order Amount", select the short answer question type > click on the gear icon for this question > Question settings page will be displayed > click Answer > enter the TOTALIN("Monday") formula in the Calculate option > click on the configure link for the Validation option > select Number, select Greater than or equal to > select Field option > select Monday Min Order Amount field from the dropdown > add a custom error message and click Save. Repeat the steps for the other sections in the form. Please try this and confirm.

PRASAD SAMANT

Jul 4, 2024

Thanks Vipin.. But we don't want to set the amount based on quantity in each section... Till the time user selects whether delivery required or not question (mandatory).. And if he select Yes then.. Swith to delivery details section... Address, delivery fee calculatiin fields.. I want validation here if in whichever section user selected the menu... That section amount should be >= 10..otherwise add more item to make order amount to 10 or more... If he doesn't select any section... That's ok.. If amount 10 or more... Pass out... (This condition doesn't apply if customer selects delivery as No) it skips the delivery details section and goes to calculation.... Summary order...

Vipin

Jul 4, 2024

Hi Prasad, when the user is ordering items for a day and if it doesn't meet the minimum amount criteria, you should show the relevant error message so that users can add more items before they choose to proceed to the next section. It is not recommended to add validations at the end and force the user to go back a section and add items to place their order. By calculating the order quantity in a section and automatically setting the min order amount for response validation ensures that users can either choose to skip a section (not add any items for a day) or choose to add items that meets the min order amount criteria before proceeding to the next section.

PRASAD

Jul 4, 2024

but Vipin... if they select order amount less than 10$ for a specific day and picking up...its allowed to select.. everything depends on whether they choosing delivery or not

Vipin

Jul 5, 2024

If you are offering delivery and pickup options for each day, then you can set the minimum amount based on whether they have chosen delivery or pickup and the order quantity for that day. If you have added a multiple choice question (Ex. Monday Delivery or Pickup) with Delivery and Pickup as two answer choices, then the IFS formula would be IFS(Monday Delivery or Pickup == "Pickup", 0, Monday Delivery or Pickup == "Delivery" && Monday Order Quantity == 0, 0, 10)

PRASAD

Jul 5, 2024

is this a mandatory question for customer input? what if customer wants to skip order for particular days n mention IFS function as a seperate short question? how will validation happen here? If customer selects "pickup" then.. we are assigning amount to 0...no validation required for this..else if customer selects " Delivery " and order quantity is greater than 0... condition fails here.. it will write 10 as amount..even if not desired for delivery..

PRASAD

Jul 6, 2024

i was able to solve this in each day with combination of IFs and validation

Add your comment