135
Views
4
Comments
get reference to $public
Question
Application Type
Reactive

Hi,

has anyone here experience with accessing the $public object of the javascript API ?

It is possible to get access to that object inside a javascript node in a logic flow, but each block and screen have their own $public, and it is not accessible through a reusable client action.

I am trying to get a reference to all of the $public objects that exists in an application (so all blocks and the screen)  The only way I have found so far, is to put a javascript node in each blocks OnReady handler.

That works fine, but it is a hassle to do, so does anybody know of how to get to them in another way ?

Dorine

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Dorine,

I don't understand the question. The JavaScript object $public, is a public object injected by OutSystems framework, and available in each JavaScript node for mobile and reactive screens. The React framework is a single-page-app framework, not all screen and block assets will be available at a single point in time.

What is your use case?

Regards,

Daniel


2025-04-17 05-42-16
Ajit Kurane

Hi Daniël Kuhlmann ,
Dorine is expecting that,

The problem  with this approach is that to write code in every block to pass on it's $public to where dorine want to do something with them. Dorine is interested in the whole collection that is available, and don't want to have to write some code for that in every single screen and block. 

Thanks,

Ajit Kurane.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP


I understand Ajit, and that is an OutSystems limitation that you cannot overcome differently. My only question is what is the use case.

2021-09-06 15-09-53
Dorine Boudry
 
MVP

My use case is this :

I am trying to make a component to show/log/edit any variable, as a tool for troubleshooting and testing, a (lightweight) alternative/complement to the debugger.

I want to make it as little work as possible to use it.

Dorine

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.