Hi. I have created a numeric field-based data-changing view for multiple devices. according to the insert number, details at the bottom of the view are being changed.
but, when the same view/page is accessed by multiple users through the URL. details in the view are changed. How to stop it?
I used binding in order to share the location of the tags here. Basically I need to changes in order viewers.
Sorry, I didn't quite understand. What data is changing across sessions or within sessions that should not change? Also explain what data needs to be shared across sessions, and what is clashing between the two requirements?
Tip: use session custom properties to maintain per-user information that is synchronized across the user's tabs (in the same browser session). Don't use gateway tags for any information that needs to be distinct per user.
Thank you for the quick reply.
When the Number changes in the numeric field, relevant equipment's properties are changed (like motor current, and voltage) It just views the equipment data.
When this page is accessed from two different computers and when one person changes the number, it impacts other users. I want to prevent it
Sounds like you are using a memory tag to hold this number. Tags are shared across the entire gateway and all applications and users. If you don't want that, don't use a tag. Some options:
-
Use a session custom property. Wherever you edit/use the number in the session property, other windows or tabs of the same session will be synchronized.
-
Don't bind the number to anything at all. Where you need to use the number for indirection, just use the numeric field's value directly. Each view will have its own number--no synchronization at all.
Yes. I used memory tags here. From this number, I create a memory tag path to locate equipment properties using an expression tag. If I need to use the session parameter. Can I write something to the session parameter? How can I do it?
Thanks
Session custom property, not parameter. Session custom properties are like any other properties in Perspective. Typically, you'd bidirectionally bind your numeric entry field's value to the session custom property so that the session property changes when your user changes the number. Then, wherever you used the memory tag to select what live data to display, use the session property instead.
You can also write to session custom properties in scripts, in precisely the same way you'd write to component properties or view properties.
{ Have you completed Inductive University? This stuff is a pretty basic part of the free training. }
Thanks. It was sorted out
I have a follow up. I was under the impression that a session property change, like changing the theme, would only effect the current session/user signed in. This does not seem to be the case. Am I mistaken on this?
To give more detail. I have a screen that helps me update tags. I was showing our co-workers how cool this feature is and must have hit save. So, my session was saved to the gateway. When another coworker tried to save a few hours later they chose gateway setting and it passed over dark more save I made earlier. Which made all our piping basically disappear.
So if I am thinking about this correctly if it is in the designers and we save those changes then go to the gateway. But if we are in a browser session it will not save to the gateway. Is this correct?
It sounds like what you are talking about here is not client sessions, but concurrent designers.
You and your coworker both had the same view open in designer. You saved first, committing your changes to the project on the gateway. When your coworker saved there was a conflict, so they would have had a choice of 'this designer' (their changes), or 'gateway setting' (the changes committed to the gateway, which is what you saved). This is not 'saving your session', in both cases you were editing the project.
If you want to test your project without accidentally making changes, you should open a browser session.
Actually no. I wish it was like that because it would have made more sense.
I did save in in the designer, I have a personal view that my coworker does not open. When I was done I saved, in dark theme mode. This was at 9:52am. We know because audits are on.
Around 3pm she went in to the clients views, I already deleted my personal view at this time, and when she hit save after finishing her work, she then said had a prompt about a conflict and chose to save gateway changes. That’s when it took effect.
Even more weird I was already working on a completely different server when this happened at the 3pm time.
Then either you must have had more than view open and committed changes to your coworker's view by accident, or there was another user working on that other view. Otherwise she would not have been notified of a conflict.
It does not matter what else you were working on at 3pm, that's irrelevant. The conflict occurring at 3pm is on her end, between the changes she has just attempted to commit and the changes already committed to the gateway (at some earlier time, by another user). Either way, if she was confident of being the only person who should be working on that view, she should select 'this designer' to avoid losing work.
This is not good in my opinion. We have a document account of it happening.
I work on data she works on views for this particular projects. The binding I used is in the picture below. The view in the back ground is my personal view and no other views were open when I was working this morning.
This binding as of today, session.prop.theme, I will say to all who read this post, it not only does it affects EVERY view you use it in the designer. But when you save it save that session to all views. So do not use, or at the very least, save unless you put the theme back to where it was before changing it.
Also, due to this I will not longer try out, or have accessible in any of my work, any ignition features unless a client ask specifically for it.
This binding ... , session.prop.theme, ... it affects EVERY view you use it in the designer.
That's the purpose of a theme.
But when you save it save that session to all views.
There is only one session for the whole project. It doesn't write to the views. All the views will read the common session settings.
... put the theme back to where it was before changing it.
Correct.
Alternatively you can use a startup script to set a default theme.
This is the correct answer. And moving forward will not make this mistake again.
After further review we figure out how this happened.
I have a personal screen that I was demonstrating on a development server that morning. One of the last things I showed was the theme change and i saved on that server. Later, when I exported that view and went to the clients sever, I imported my view to make adjustments to tags. By doing so the session theme change to match my imported views theme change settings.
Since tags updates are gateway based I normally do not save. This is so the client never sees the view I imported. Yesterday, after I deleted my view and closed the designer I hit save and exit out of habit. By doing this it pushed my session setting to the gateway.
Later in the day when our coworker went to work on the project and they finished their work and saved, the gateway conflict came up, and by clicking gateway setting changes, pushed those earlier unknown saved gateway setting changes to all users
To remedy this I removed that feature, and all other features that can update other user session settings.