web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Pls Help sytax Run VBS...
Power Automate
Suggested Answer

Pls Help sytax Run VBScript custom object Key Value "%Map['Dunn']%" not working

(0) ShareShare
ReportReport
Posted on by 79
Add on:
Think of Map like a Config
i created a config that i name it as Map
So it become a custom object
custom object syntax is %Config['Filename']% the key is Filename so it will grab the Value from the Config (e.g. ABC)
so hereby my custom key is Dunn so it will go to Map table to grab the value say e.g. ABC
 
in the past i can use it in VBScript to run as "%Map['Dunn']%" but suddenly it keep failing
and my variable is hitting maximum limitation of 500
so wonder is there any alternative to write a custom object in VBScript
Dim Dunn
Dunn = "%Map['Dunn']%"
don't seem to work...
 
the row error shown complilation error is this row that i am showing session.findById.....
 
power automate desktop run vbscript
use custom object key value in the script for SAP
session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA:SAPLBUS_LOCATOR:2000/subSCREEN_1010_RIGHT_AREA:SAPLBUPA_DIALOG_JOEL:1000/ssubSCREEN_1000_WORKAREA_AREA:SAPLBUPA_DIALOG_JOEL:1100/ssubSCREEN_1100_MAIN_AREA:SAPLBUPA_DIALOG_JOEL:1102/tabsGS_SCREEN_1100_TABSTRIP/tabpSCREEN_1100_TAB_03/ssubSCREEN_1100_TABSTRIP_AREA:SAPLBUSS:0028/ssubGENSUB:SAPLBUSS:7023/subA02P01:SAPLCVI_FS_UI_CUSTOMER_CC:0052/ctxtGS_KNB5-MAHNA").text = "%Map['Dunn']%"
Microsoft VBScript compilation error: Unterminated string constant

i cannot add more variable is reaching 500 variable limitation so i need to write key into vbscript 

it didn't work even i put a dim
Dim Dunn
Dunn =  "%Map['Dunn']%"
I have the same question (0)
  • Vahid Ghafarpour Profile Picture
    781 Super User 2026 Season 1 on at
    You're running into a classic VBScript limitation: it doesn't understand Power Automate Desktop's %VariableName% syntax inside the script itself. That syntax is only parsed by PAD before the script runs.
  • Suggested answer
    eetuRobo Profile Picture
    4,484 Super User 2026 Season 1 on at
    Can you show what value you have in the %Map['Dunn']%

    Also make sure its exactly that variable that is causing the issue. So if you haven't check which row the error is coming from. I have highlighted the example of the row number that is in the script error variable. 


    To troubleshoot try to hardcode the value in to the VBScript. So if %Map['Dunn']% value is "abc//123" then use it without PAD variable to see if that gives error or not.

    Like so:
    session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA:SAPLBUS_LOCATOR:2000/subSCREEN_1010_RIGHT_AREA:SAPLBUPA_DIALOG_JOEL:1000/ssubSCREEN_1000_WORKAREA_AREA:SAPLBUPA_DIALOG_JOEL:1100/ssubSCREEN_1100_MAIN_AREA:SAPLBUPA_DIALOG_JOEL:1102/tabsGS_SCREEN_1100_TABSTRIP/tabpSCREEN_1100_TAB_03/ssubSCREEN_1100_TABSTRIP_AREA:SAPLBUSS:0028/ssubGENSUB:SAPLBUSS:7023/subA02P01:SAPLCVI_FS_UI_CUSTOMER_CC:0052/ctxtGS_KNB5-MAHNA").text = "abc//123"
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,048 Super User 2026 Season 1 on at
    Hi,
    • Suppose your PAD variable is Dunn (string value).

    • Create a PAD variable VBScriptCode with this text (note """ is a quote inside VBScript string):

    Dim Dunn
    Dunn = "{DunnValue}"

    session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA:SAPLBUS_LOCATOR:2000/..." ).text = Dunn
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard