Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Not able to select the dropdown value in our Employee Service Portal(Customized Portal) using ATF.

sarathsr
Giga Contributor
 
4 REPLIES 4

sarathsr
Giga Contributor

I have tried both Set Variable value and Set Field Value options. Both the options did not work.

Keeping both Description below for reference.

 

Answer the questions on the form as follows: Who are you submitting this request for? = Raj

Set the following values on the form: Opened for = Moumita

 

Hi @sarathsr ,

 

Let me tell you why Set Variable Value and Set Field Value often fail in this scenario, and what you can do instead.

 

Why your steps didn’t work

  • Set Variable Value:
    Works only for variables on catalog items/forms in the standard Service Portal. If your portal is customized, the variable widget may not be bound correctly, so ATF can’t inject the value.
  • Set Field Value:
    Works for record fields on forms (like Opened for on an incident form). But in portals, especially customized ones, the field may be rendered through a widget that ATF doesn’t recognize as a direct field input.

 

Recommended Approaches:-

Here are practical ways to handle dropdowns in ATF for portals:

  1. Use "Field Values Validation" step after setting values
    • First, try Set Field Values (not Set Variable Value).
    • Then add a Field Values Validation step to confirm the dropdown actually holds the expected value.
    • Sometimes ATF sets the value but doesn’t visually update the widget until validation forces a refresh.
  2. Switch to "Test Step Configurations" for Catalog Item variables
    • If Who are you submitting this request for? is a catalog variable, use the Set Variable Values step but ensure:
      • The variable name matches exactly (check the Question Name in the catalog item, not the label).
      • For reference variables, use the sys_id of the target record (e.g., Raj’s sys_id) instead of the display name.
  3. For "Opened for" (reference field)
    • Use Set Field Values with the field name opened_for.
    • Provide the sys_id of Moumita’s user record, not just the text "Moumita".
    • Example:
    • Field: opened_for
    • Value: 46d44f37db220010b6f6a345ca9619f3  (Moumita’s sys_id)
  4. Portal customization workaround
    • If the dropdown is rendered through a custom widget, ATF may not hook into it. In that case:
      • Use UI Action / Client Test Steps to simulate user interaction (e.g., "Open Catalog Item" → "Select Variable Value").
      • Or temporarily test the same catalog item in the standard Service Portal to confirm ATF works there, then debug why the custom widget breaks binding.

 

Action Plan for Your Case:-

  • For “Who are you submitting this request for? = Raj”
    Use Set Variable Value with Raj’s sys_id.
  • For “Opened for = Moumita”
    Use Set Field Value with Moumita’s sys_id.

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

Thanks,

Anupam.

 

Dr Atul G- LNG
Tera Patron
Tera Patron

any screenshot mate.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@sarathsr 

what type of form is this?

catalog item or record producer?

share some screenshots.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader