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 / Extract data with java...
Power Automate
Answered

Extract data with javascript gestelementbyid empty text

(0) ShareShare
ReportReport
Posted on by 10
 

I am extracting information from a web with a javascript function. I use a getelementbyid but always get an empty string

 

 function ExecuteScript(){
 document.getElementById('formHeaderTitle_0').value = %Proyecto%
}

 

 PPLover_1-1661333858374.png

Thanks

  • Verified answer
    VJR Profile Picture
    7,635 on at

    Hi @PP-Lover 

     

    Since you are getting/reading the value from the webpage into a variable, the "getElementById" should be on the right hand side of the = sign.

     

    Here is an example:

    function ExecuteScript() 
    {
     var x = document.getElementById("country"); 
     return(x);
    }
    

    Then you put a "Display Message" on x to check its contents.

     

  • PP-Lover Profile Picture
    10 on at

    This work perfect.

     

    Thanks a lot

  • YeuHarng Profile Picture
    48 on at

    YeuHarng_1-1693361376234.png

    YeuHarng_4-1693361469073.png

     

    YeuHarng_2-1693361385880.png

    YeuHarng_3-1693361393051.png

    hi, i try to get get all the data from <h3> elements with the class "lsow-title" in javascript in power automate,the code run in webpage console can get all the data, but why when i run in powerautomate it can't work? It can only get [Object]

     

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
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 211 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 190

Last 30 days Overall leaderboard