Best approach to display and use Store Codes from cmn_location in Catalog variables?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday - last edited Thursday
Hello Community,
I have a Catalog Item with:
a Reference variable to cmn_location for the Primary Store;
a List Collector on cmn_location for Additional Store Visibility.
Both variables use a dynamic Reference Qualifier to filter the available locations based on the Requested For user.
This Catalog Item is used to create user accounts in a third-party application, which requires the Store Code to be sent through an API.
The display field of cmn_location table is name, while the Store Code required by our business process and external API is stored in the custom string field u_store_code.
Using ref_ac_columns, I can display the Store Code while searching for a location. However, once a location is selected, only the location name is displayed, both before submission (on the Service Portal form) and after submission (in the approval view and Catalog Task variables).
We need to be able see the Store Code to validate the request, and the integration must also retrieve the corresponding Store Codes to send them to the external API.
I identified two possible solutions:
Change the display field of cmn_location to u_store_code, but this would affect every reference to the Location table.
Use a client-callable Script Include and Catalog Client Scripts, along with an additional read-only variable to store and display the Store Code. This works, including dynamically updating the Store Code when the user changes the selected location. However, the same requirement may apply to several Catalog Items, and I would like to avoid duplicating this logic.
For the List Collector, the displayed Store Codes should also update dynamically whenever locations are added or removed.
Is there a more standard or reusable approach for this use case?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
Hi Juhi,
Thanks for your suggestion! 😊
I tested the Multi-Row Variable Set, but the Reference Qualifier cannot directly access variables from the parent Catalog Item, such as Requested For, which we use to dynamically filter locations based on the user's company.
The MRVS also seems noticeably slower to load in the Service Portal.
For now, we've decided to keep the List Collector, combined with a Script Include and Catalog Client Script to dynamically retrieve and display the Store Codes.
This seems to offer better performance and a simpler user experience for our use case. Thanks again!