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 / JavaScript Extract Fun...
Power Automate
Unanswered

JavaScript Extract Function returning [object Object]

(0) ShareShare
ReportReport
Posted on by

Hello everyone!

I am trying to extract a text from a cell in JIRA Service Management, but instead of returning the text inside this cell it is returning me [object Object].

Could someone help me to overcome this? 

This is the code I am using, but I also tried a lot others:

 

function ExecuteScript()

{ var targetNode = document.querySelector("#customfield_12240-val"); var observer = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { var x = document.querySelector("#customfield_12240-val .shorten span").textContent; if (x) { observer.disconnect(); return JSON.stringify({ text: x }); } }); }); observer.observe(targetNode, { childList: true, subtree: true }); } 

I have the same question (0)

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