once again I have to ask you for a help. I have a problem with creating public variable and using it in formula. The details of this issue is: 1, right after starting a Lotus Notes Application i have to create public variable EmpNum which will be contain an employee number (the number will be imported from IBM Blue Pages) 2, this EmpNum variable will be used to filter the data in a view, so I have to use it in formula in View Selection.
I'll be very grateful if you help with this issue. Maybe there is possible any simplest solution of this problem?
Thanks in advance, Tomasz (td2003)
EDIT: Torsten, Panu, thank you. I've decided to try write an EmpNum variable in notes.ini using @SetEnvironment and read it by @GetEnvironment, and it works. BUT (!) there is a very strange thing: 1) when I entered formula "SELECT((form="ITForm") & (Status="Completed") & (TX_EmployeeNumber=@Environment("EmpNum")))" the view shows me all document where "TX_EmployeeNumber" is EMPTY; 2) otherwise when I entered formula "SELECT((form="ITForm") & (Status="Completed") & (TX_EmployeeNumber!=@Environment("EmpNum")))" (not equal) the view shows me all document where "TX_EmployeeNumber" is NOT EMPTY and no matter if TX_EmployeeNumber have exactly the same value as EmpNum. For example: if EmpNum="P11" the view with 2nd formula shows the documents where TX_EmployeeNumber fields contains "P11", "P22", "A32" and so on.
I'm sure that @Environment("EmpNum") retrieves correct data from notes.ini.
I'm totally confused and completely don't know what's going on. Do you have any idea about this?