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 / Syntax error - VBScrip...
Power Automate
Unanswered

Syntax error - VBScript from SAP

(3) ShareShare
ReportReport
Posted on by 6

I am new to both VB and power apps and hope anyone here can help in this issue. Big Thanks in advance.

 

I use recording in SAP and get the VBscipt, however the below line of code always show syntax error when I want to run it in power desktop. Not clear about what's wrong with it

 

session.findById("wnd[0]/usr/btn%_IT_LGORT_%_APP_%-VALU_PUSH").press

 

Categories:
  • Claudenirs Profile Picture
    3 on at

    It seems that the problem is the "%", but I'm not able to solve this issue yet.

  • AronBrown Profile Picture
    45 on at

    Hi @blbbb, Try adding a % after the % your recorder added, like this.

    session.findById("wnd[0]/usr/btn%%_IT_LGORT_%%_APP_%%-VALU_PUSH").press

    This passes only the first % since PAD uses % to denote the variables. 

  • SyedMinhajUddin Profile Picture
    3 on at

    Double % worked for me ! Thanks

  • GREGWOUARE Profile Picture
    39 on at

    Solution with % works perfectly fine for me :

     

    session.findById("wnd[0]/usr/btn%_SREQSTS_%_APP_%-VALU_PUSH").press => session.findById("wnd[0]/usr/btn%%_SREQSTS_%%_APP_%%-VALU_PUSH").press

     

    thank you for that ! 

  • Mblaszczyk0179 Profile Picture
    3 on at

    great it works!!! It worked, as you wrote, you need to double "%" everywhere.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard