How to Implement Quantity of an Item
3 min
a customer has a requirement for a quantity of an item to be entered on a service, for example a keyboard the customer requires that instead of adding a keyboard service to the cart multiple times (with allowduplicates or orderonly set) they can add it once and enter a quantity for how many they want the use case for this functionality is for low value peripheral hardware like keyboards that are not managed by activate (i e activate doesn't capture the return of the hardware when the user is terminated) solution parameter description service web form a textbox to capture the quantity and binds to the service instance data\quantity, this is used in the expressions to calculate the total items and total cost order services task > web job view modified web job view parameter which uses expressions to calculate the item count and total cost of all items in the order sums the cost quantity of items with a quantity, if quantity isn't specified then assumes one, this would apply to services that don't have a quantity specified order services task > approvaleditform modified approvaleditform parameter added the gridpanel to the top so costs and quantities show for approvers notes it's recommended that this is only used for order only services as having instances saved with quantities makes future management of the service a more difficult experience for example, do you update the service to remove a quantity? what if you want to transfer 1 of these to a different user? activate does not recommend that this is used for high value items (e g laptops), the correct approach for these items is a service with a linked asset that starts a return process when the user is terminated costrecurring is out of scope of this example this only applies to one off costs