I want to use some specific user selected object to dynamically control how queries are displayed.
I am unable to find a way to get the ID of the logged in user or any other object in a script.
In my mind, If i can get the ID of a user selected object, then I can get its attribute values and use them to change the query.
This is for query Panel operations Execute Javascript.
My approach may be wrong or maybe the question is not clear, but I would like some help please.
Thanks
Objects in Javascript context
Re: Objects in Javascript context - Solved
Solved by with Execute Javascript in the VP First Command and storing it in local storage.
var userId = parser.m_userPrefNode.attributes["user_id"].value;
// Save the user ID to local storage
localStorage.setItem("userId", userId);
console.log("User ID saved:", userId);
var userId = parser.m_userPrefNode.attributes["user_id"].value;
// Save the user ID to local storage
localStorage.setItem("userId", userId);
console.log("User ID saved:", userId);
Re: Objects in Javascript context
LoggedInRegularUser.ID
Gives you that value
Gives you that value
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL