AnsweredAssumed Answered

refreshing global variable

Question asked by Kat11_1 on May 22, 2012
Latest reply on May 25, 2012 by philmodjunk

Title

refreshing global variable

Post

I have global variable Global Data::g_year set up as number.

and a global varialble g_years set up as calcualtion based on g_year.  Case ( Global Data::g_year = "All" or IsEmpty( Global Data::g_year) ; "*"; Global Data::g_year )

On a layout I have a field for g_year which is set up as a drop down field with a value list called years

All

----

2006

2007

2008

2009

2010

2011

2012

with the exit script trigger on it that runs a script which finds all the recods yor the year (or years) selected in g_year.

Enter Find Mode []

Set Field (Files::Year; Global Data::g_years)

Perform Find []

My problem is that when I click on the g_field on the layout in browse mode the drop down does open up and I can bring the cursor over the item on the list but I can't seem to select it ... I made sure the field can be edited in browse mode. It alsmost seems that it is a bit of hit and miss. If I change the field's control style to edit box and than back into drop down it works. Sometimes. I suspect this has something to do with the fact that  variable g_years is based on varable g_year but i don't see how. Or is thre a problem with "refreshing" global variables. I'd appreciate your suggestions.

 

Thank you

Outcomes