- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2020 11:56 PM
Hi,
I am using Flow designer to trigger *on insert* into a "transaction" table, and write some information from this table into another table, e.g. target_table -> Company = trigger -> transaction table -> company OK.
This works completely fine for all field except the Price field (field type Price) and I don't understand why.
target_table -> Price = trigger -> transaction table -> Price insert takes place for all fields, but no data in the target table Price field
It appears the Price is not a simple field but stores data in another table?
For the moment I have switched to using the decimal field instead of the Price field, and this works, but I would prefer to have the correct field type, also because of the formatting.
Can someone please advise how to solve?
Solved! Go to Solution.
- Labels:
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2020 01:02 AM
The solution we found was to create a custom Action "CONVERT TO PRICE" and put that into the workflow before the insert/update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 12:07 AM
Hi Patrick,
I did that using Update Record Action; you can set it during the Create Record Action as well
don't drag and drop the data from the Data section to the fill; type in the text box
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 12:25 AM
Yes this works for me too if I always set the same value (as you have done). Please note that I use the Pills to select the Price from the record in the other table, and insert it into the Price field of the other table. This does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 12:52 AM
Hi Patrick,
if that is the case then you can try to use script to set the value in that format
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 01:02 AM
It means Servicenow exhibits the same issue for you when you try it, i.e. you can't use flow designer pills to set the value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 01:53 AM
Hi Patrick,
I haven't worked extensively on flow designer so cannot comment on that piece.
you can use flow designer pills to set the value but as you said it doesn't work well with price field; possibly it may or may not work for currency field as well
Not sure whether ServiceNow is aware of this.
The reason I think is if you get price value in background script for a particular record it only gives you the integer/float value and not the currency code
var gr = new GlideRecord('incident');
gr.get('af5cf0310794d010540bf2508c1ed094');
var price = gr.u_cost;
gs.info(price); -> prints 101 and not USD;101
The same logic might be used internally to get value from existing record if you use designer pills; so it might be picking only the int/float value and not the code; So I would recommend using script to set that particular field
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader