How to keep track of the branch locally

Good morning from Gran Canaria.

Here is the situation:

I´m writting an application for a customer that has 2 branches. The application will be in one of them and the other will connect trhu webclient or smart client to the main one.

I need to keep track of the branch connected so the user does no have to choose the branch he is in everytime he launches the application. Therefore I´ve been thinking to sotre the branch id locally the first time the user runs the application. How can I write the branch id locally in the client machine and then read it everytime the solution is run?

Thanks in advance.

Hi Juan,

You can store local info on the client by application.setUserProperty(propertyname,value).
At client launch, the client is able to read the property by application.getUserProperty(propertyname).

Hope this helps,
-Karel

Hi Karel. Thanks for your reply.

I have to questions about:

  1. Where is that property stored? I guess on the server but would like to know the file.
  2. Using setUserProperty means that it´s for the user or for the client machine?

Thanks.

jasantana:

  1. Where is that property stored? I guess on the server but would like to know the file.

The property is stored in C:\Documents and Settings[username].servoy\servoy_client.properties

  1. Using setUserProperty means that it´s for the user or for the client machine?

The userproperty is stored on the client machine in the user folder, so it’s both.

Thanks Karel.

I got it know.

Hi all,

I explain my situation:

I’m connected with the end-user server with citrix.
I’ve saved my user properties properly,I can see them into the servoy_client.properties file under C:\Documents and Settings[username].servoy\servoy_client.properties as you have specified before.

So these are my problems:
1 - When I set a new value for these properties I can see it into the file,BUT when I get it back,I obtain always the old value.
2 - If I delete all the file under the “.servoy” path,another copy of “servoy_client.properties” is created when I exit from the solution(good),so (in this case) from where the solution takes the user’s properties(in add the old user’s properties are restored).
3 - Are there others places in wich this properties are stored?

Am I missing something? The properties names when I make “set” and “get” are the same(I use this for fill the user_name field into the login form)
Into the developer all works fine.

Thanks in advance for you time,

Marco

do you also have these properties on the server defined as user properties? (so with default values)

if you do see the right value in the properties file on the client but you are constantly getting the default values back and not the values from the properties file
that sounds that as a bug to me can you make a case?

Thanks for the fast answer!

do you also have these properties on the server defined as user properties? (so with default values)

At the beginning yes,into the “servoy.properies” (or there is another file to check?) under the “application_server/” path I’ve found the involved (old) user properties,I’ve delete only these properties without toch the others but never changed. I don’t really know from where,the smart client, retrive this properties.
I’ve tried also the delete all the file under “.servoy” and to delete all the java temporary file from the control panel but this wrong value re-comes from somewhere.

Case opened with id 367991.

Thanks

Marco