Is there a way to pull data into clipboard from a browser result?
On my Current project, we are interacting with external system to get JSON format data. The result data will need to be display in a drop-down list on the user screen.
We cannot use web services to interact with the external system because the external system requires JavaScript and cookies to be enabled on the request; the external system response needs to be
rendering on a browser.
In my POC, I added a link in one of the section and pass in the URL using “Open URL in Window” action on the click of the link. Upon doing this, I was able to display the response to the browser. Now the challenges are:
- How do I run the URL in the background because the client does not want the user to click on a link?
- How can I get the result from the browser into the clipboard which will then feed in into the drop-down list for the user?
Any help or Idea will be greatly appreciated
***Updated by moderator: Marissa to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Wow, that's a complicated problem. If the response is structured in such a way that you get access the data via JavaScript, you can map it to properties (hidden or visible based on business need) and from there to the clipboard when you submit the form. I don't think Open URL in Window is the ideal solution since it takes you outside of the PRPC context and I assume your ability to directly manipulate it via JS. I believe you might be able to get open URL in space to allow it to be in a context where you can work with it, although it's not something I've ever done, so I could be way off base. I'm not sure what cross site scripting problems you are going to run into, but that could turn this exercise into a deal breaker. openUrlInSpace is something that could be called directly in JavaScript (although you are going outside the guardrails), which should allow you to set this up in the background. Presumably you could code it to then refresh a section and pass data on to the clipboard for the dropdown (via another refresh section perhaps).
I'm sure much of that is an oversimplification, but hopefully it helps. Good luck!