Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

calculation logic based on selected fields on catalog item

SLeelaRaR
Tera Contributor

in my catalog item I have multiple items(fields) and price for that items as separate fields., (for example: field A : veg biryani., field B: veg biryani price., here I wrote an condition whenever customer selected item then only that item price should be visible)and  I had a discount field & options to that field  like 10%,20%,30% , whatever I selected  those items price should calculate and apply the discount based on discount value to each item individually ., then populate that net total.(for example I selected 2 items, price is 200,300 ., here I want to apply discount to each item separately.).
can you give me the suggestions/codes to achieve this scenario.

1 REPLY 1

JenniferRah
Mega Sage
Mega Sage

I would put your item list in a custom table. Then in the form, use a Multi-Row Variable Set to allow the user to select an item from the table and enter the quantity. You can calculate the line item price. Then you can have a variable in the catalog item that goes through the MRVS and calculates the total price.