Parameters on ignition perspective

I have a 2 folder: application and event

on application folder I have a view called building where I created params idBulding
image.

On event folder I created a View called add-edit-event where I created params idBulding
image

Now, on my add-edit-event view I want get building param that I cretead on folder building in to my application folder.

I don’ know how I can do it.

here is another image to illustrate what i am trying to do.

It depends how you want to open your add edit view. You can either open as a popup and pass the idBuilding as a param that way. If you want to be able to leave it open and click on other buildings and have the popup update, then you could use a message (system.perspective.sendMessage) and handle the message in your popup view to write the payload to the value of your idBuilding param.

Alternatively, you could also use session params to hold your idBuilding

1 Like

I only sent my param idBuilding on another View when I change it .
I don’t know how can I use :system.perspective.sendMessage. can you give me un exemple how can use it?

I think you’re confused about what parameters are for.

Parameters are evaluated when an instance of the view is opened, to configure its behavior. You can think of parameters as data passed to an object to give it properties, a bit like a function or a class in a programming language:

def function(parameters):
    do_something_with_parameters(parameters)

Here, I believe you’re trying to synchronize data between two views, not parameterize them.
So, as @nminchin suggested, use session.custom properties if the scope of the data should be a perspective session, or tags if the data should be available to all opened sessions.
sendMessage can also be a solution here, but I think we need more information about what you want to do, not how you’re trying to do it.

2 Likes

I used session.custom it work. thanks!