Jump to content

I've Dug A Whole With A Highlight


This topic is 5759 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I've created a problem that I am hoping someone can give me a simple solution for.

I have a database with several tables. I have a session table that is created/deleted everytime a user logs in/out. All of my other tables are related to the sessions table and the records are viewed through portal windows. Each related table has a calcualtion/container field within it. This field is used to create a highlight.

The idea is that when I "select" a record in the portal window, the session xd field is set with that records id. The highlight field contains a calculation that basically says when the id field = the session xd field get the light green object in my global table containing the "background highlight" object. This field is placed below the related record in the portal window and the result is the appearence of a "highlighted" record.

This has been working fine as I have gone through and developed the remaining functions of the solution. But I failed to consider something very important. Multiple users.

When I log in and select a record, the record is highlighted just fine and easily identifies the record I am working on. But when an additional user logs in and selects a record, their selection is also highlighted. So now not only do I see the record I have selected as highlighted, but I see the record the other user has selected as highlighted as well.

My brain has turned to mush with all of the other details of this solution.

Can anyone give me a fix so that the user only sees the highlight appear behind only the record they have selected?

Link to comment
Share on other sites

How about making session xd field a global field?

I do something very similar to what you are doing only my version of your session xd field is a global field.

I did find though that the session xd global field has to be on the layout with your list for it to refresh properly. I just made it as small as possible and unenterable and stuck in a corner. Works great for me.

Link to comment
Share on other sites

I'll give it a try. But I'm not sure I understand. right now my schema looks like this.

SESSIONS::xd_global X SESSIONS GOLBAL::id global. This table contains a field called "ci_display_field_backgrounds". This is where the highligh object is stored.

SESSIONS::xd_client = S CLIENTS::id client. In the clients table is a field called ci_highlight. It's calculation looks like this:

If(S CLIENTS::id_client = SESSIONS::xd_clients ; GetRepetition ( SESSION GLOBALS::ci_display_field_backgrounds; 1); "" )

How will making SESSIONS::xd client a "global", change this behavior?

Link to comment
Share on other sites

How will making SESSIONS::xd client a "global", change this behavior?

By using a global the data in the xd client field will only affect the one user. So, that field can contain different data on different workstations and the users won't be affecting each other.

So, your calculation field will calculate based on the local user and not be influenced by other users.

Link to comment
Share on other sites

I was just logging in to tell you that it worked. I am going to have to go back and re-learn what global storage can do for me. Thanx for the help.

Your welcome! Globals are a great way to deal with many things in a multi-user application. I can't imagine dealing with multi-user apps without having globals.

Link to comment
Share on other sites

This topic is 5759 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.