How to modify Quantity field from drop-down to integer/string type in 'Add to Cart' in ServiceNow native view

Vishu
Tera Contributor

I want to modify quantity type from drop-down to integer/string type so that user can input the quantity of items to be added into cart while requesting for item. Currently, ServiceNow is offering drop-down up to 10 items to choose as quantity. our scenario demands customer to input values like 20,50,100 etc to place bulk order. I tried to modify the OOB UI macro 'sc_cart_main' but not able to change anything.

The other related thread in community didn't solve the purpose. Kindly help.

find_real_file.png

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Vishnu,

If you are sure about the values for the quantity then why not add those and inactivate the current ones

  1. Navigate to System Definition > Choice Lists.
  2. Filter the list for records with Table set to sc_cart_item and the Element set to quantity. The existing quantity choices appear.
  3. Add your value as 50 for Label and 50 for Value

I added 50 as choice value and it is showing in the cart

find_real_file.png

find_real_file.png

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Vishnu,

Any update on this?
Can you mark my answer as correct, 👍 helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Vishu
Tera Contributor

Hi Ankur, Thanks for the response.

My requirement is to change the quantity field from dropdown to simple 'string' or 'text' based so that user can input the number instead of selecting from drop-down. It is feasible to convert the type in Service Portal but couldn't find the exact macro changes when it comes to modify for native view.

 

Seeking assistance.

Hi Vishnu,

I don't think you should allow it to be string. User can enter any value there other than integer which may result in further issues

You should rather use the out of the box capability and add choice values decided with the stakeholders

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader