Shared data with in form and views

Hi,

As per my application requirement, i have some data which is on webserver. now i have a script library which can get that data from webserver, now as that data required at many places like forms and views ,as i have cutsomized forms and views.

Now , i am using same lotus script library at both places. But both forms and views will have their own instance of script library , so even if i use global variables to set that data in a global variable both forms and views will have their own instance of global varibale which means i ahev to set data multiple times.

is there any way that i can achieve this where i need not to reload the data , no matter whether i am in forms or views?

Subject: shared data with in form and views

You can use NotesSesssion.SetEnvironmentVar and NotesSession.GetEnvironmentVal or NotesSession.GetEnvironmentString.

-rich

Subject: RE: shared data with in form and views

Hi Rich,

Many thanks for your reply.

NotesSesssion.SetEnvironmentVar will add this string in notes.ini file, my string is very long, do you think its a good idea to put long strings in notes,ini file?

if this is the only way then i might also need to reset the enviorenment var as well, in case we need to reload the data, because data might have changed.

is there any event which can be triggred when lotus notes is being closed and i reset the enviorement varibale?

Subject: RE: shared data with in form and views

I believe there’s a limit of 254 characters for lines in the notes.ini file. And there’s no event that I can think of.

-rich

Subject: RE: shared data with in form and views

but my data will be longer than that. so that mean notes.ini is not an option. what else i can try then?

Subject: Store it in a document

you could store it as a regular document in a database, or in a profile document.

Subject: RE: Store it in a document

Thats what i was thinking too, Thanks Carl for confirming.

another question is i might need to clear this data , i want to do it when user restart lotus notes. what can i do for this?