ATF – How to set dynamically populated Select Box variable in Service Portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I’m working on an ATF test for a Service Catalog item in Service Portal and have an issue with the Set Variable Values (SP) test step.
The catalog item contains a Select Box variable called request_type_choices. The choices for this variable are not configured statically on the variable itself. They are populated dynamically by an existing Catalog Client Script.
When I configure the standard Set Variable Values (SP) ATF step, I cannot select any of these dynamically generated values.
The value is available on the actual Service Portal form, but it is not available when configuring the ATF step.
I cannot modify the existing Catalog Client Script, so I’m looking for an ATF-side solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@kwija -
You need to use two separate "Set Variable Values(SP)" steps before proceeding with the remaining test actions.
Note: If a field depends on another field, configure and set the dependent fields in separate steps to ensure the values are populated correctly.
---------------------------------------------------------------------------------------------------------------------------------------------------
If my response helped, please mark it by selecting "Accept as Solution" and " Helpful."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Sardash No, this is not the case. Field depends on Cat. item, not on another field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
that variable doesn't have choices in Question choices table?
share variable config screenshot
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
No, this variable is part of variable set used in couple different cat. items and it is dynamically loaded based to cat. item (different selections for different cat. items) and for that Catalog Client Script is used. So when user opens specific cat. item in service portal -> can see available choices, but when try to use Set Variable Values (SP) ATF step -> there are no choices (as in my screenshot above). I tried to create new Step Configuration but it is not possible to create new UI step. Here is Catalog Client Script:
