- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 08:19 AM
hello
i would like to read the value of the recurring_price field (cat_item) in a client script.
there is a value entered, but i dont get it.
i tried with g_form.getValue('recurring_price') and i read about current..... but the script shows an error when current is used.
kind regards
Oliver
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 08:35 AM
@xlarge74 Ok yeah so it looks like you have this set up as a catalog client script. This is looking for a variable on the catalog item called recurring_price, which doesn't exist.
I will note that you also need to set the value in Recurring price frequency in order to see that value display alongside the price in the widget on the right of the service catalog. To access the value.
What are you trying to do with the recurring price information? If you simply want to display it, just set the frequency and it will display as mentioned above. If you are trying to use the value for manipulation, that will be more complex.
I will note that you can technically access the value at $scope.data.sc_cat_item.recurring_price_subtotal. I found this out by CTRL + right-clicking the price widget, logging $scope.data to console, and combing through the data object.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 03:05 AM
are there maybe any other thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 08:51 AM - edited 03-17-2025 08:52 AM
Can you please share a screenshot of your entire client script record? I am beginning to believe it is an issue with this. Could it be an issue with your Application scope being different
I was able to accomplish what you are trying. Also I'd like to quickly note that currency fields return with the currency type prior to the number, as you will see in the screenshot below, which may require you to do some additional scripting if you're trying to extract just the number.
Here is the client script I am using:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 01:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 08:35 AM
@xlarge74 Ok yeah so it looks like you have this set up as a catalog client script. This is looking for a variable on the catalog item called recurring_price, which doesn't exist.
I will note that you also need to set the value in Recurring price frequency in order to see that value display alongside the price in the widget on the right of the service catalog. To access the value.
What are you trying to do with the recurring price information? If you simply want to display it, just set the frequency and it will display as mentioned above. If you are trying to use the value for manipulation, that will be more complex.
I will note that you can technically access the value at $scope.data.sc_cat_item.recurring_price_subtotal. I found this out by CTRL + right-clicking the price widget, logging $scope.data to console, and combing through the data object.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 01:45 PM
as we were a little bit under pressure, we are using now a variable which holds the price, because we needed it for manipulation. thanks for your help jc21 and your precious time 😄