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

Notifications

Announcements

Community site session details

Community site session details

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

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
    697 Super User 2025 Season 2 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,204 Super User 2025 Season 2 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
    3,844 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard