Show Price on Portal catalog view from items in a list collector
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2025 06:53 AM
Hi Folks,
I have a Catalog Item that has a List Collector from cmdb_cI_appl with list of Software & a Custom Column named Software Cost. I have created a Catalog to request for Software but unable to show the price in Catalog View. I have tried to enable Pricing implications post updating Cost for a given line item but the cost is not shown.
I am trying to avoid an additional variable to calculate the cost, even if I have a variable that calculates the cost how do I push that to the Price field upon submission on the Catalog. Any thoughts will be helpful. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2025 06:58 AM
Hello @iDNS
Please create another variable that will store the cost of the selected values from the list collector.
You will need to create a on change catalog client script and pass the values using glideAjax, then you can concatenate all the price values that you got and update the field.
Kindly mark my answer as helpful and accept solution if it helped you in anyway,
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2025 07:15 AM
Thanks Shivalika, I have gone down this route to create a variable named total_cost & displayed on the Catalog form. I have a OnSubmit Script to update the Price. It still sets to 0 instead of the total_cost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2025 07:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2025 08:37 AM - edited 03-09-2025 08:39 AM
Thanks, I was not converting the data types causing an issue. I was able to convert to a float & that fixed my issue. BTW I had to use a BR instead of a Client Script. The Client script refuses to work.
function onSubmit() {
var totalCost = g_form.getValue('total_cost');
var finalCost = totalCost.replace('£', '');
//alert(finalCost);
g_form.setValue('price', finalCost);
}