How to populate a catalog variable value in the sc_task customize field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-17-2024 06:18 AM
Hi Team
I have catalog item "Hardware" and in that there is field variable called "Asset Type". "Asset Type" holds different type of value called Laptop, desktop, Macbook etc. I have created customized field "u_asset_type" in the sc_task. Now I want to populate the Asset ype varible value in the "u_asset_type".
For that I have written a before BR on insert and update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-17-2024 06:25 AM
Are the choices of the same value? What kind of field is 'u_asset_type'? What does 'current.variables.asset_type' return when you log it? Are you sure the variable is also on the sc_task table and not on a different table?
Why not handle it in the (work)flow processing this catalog item?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-17-2024 06:32 AM
Asset type variable is a dop down field where as u_asset_type is a string value. I have to show only one value so i have created like that.
hat does 'current.variables.asset_type' return when you log it? - - - - -Not sure
re you sure the variable is also on the sc_task table and not on a different table? - - - Variable value i can it in the sc_task but variable values i guess it store in a different table.
Why not handle it in the (work)flow processing this catalog item? - - - I tried to map this in the flow design but it is not happening.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-17-2024 06:41 AM
The start of your answer is in logging the value, to see what it returns. If there is no 'current.variables....' you will need to get it from the RITM. I think, since you can't do it in the flow, nor in through the BR, your variable is either not there, or you can't map the choice value to the string value.
Maybe also put a log in your BR to check what current.variable.asset_type.getDisplayValue()
returns
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark