Default values for edit tables (OpenInsight)
At 03 DEC 2001 01:06:21PM Mike O'Neal wrote:
Hello everyone:
Could anyone give me a quick primer on setting static (hard-coded) and dynamic (calculated) default values for edit tables? Setting defaults via the dictionary doesn't seem to work, so guessing it has to be done via POSCHANGED in some manner?
Thanks much,
Mike O.
At 03 DEC 2001 01:23PM Sean FitzSimons wrote:
Mike,
What exactly do you want to do with the edit table values?
Sean
At 03 DEC 2001 02:42PM Mike O'Neal wrote:
Hello Sean:
]What exactly do you want to do with the edit table values?
Let's say that I always want the value of a particular cell to default to D if that cell is empty.
Or… let's say that I want a cell to default to a value that is already stored in another dictionary item (similar to the {} functionality in AREV)
Thanks!
Mike O.
At 03 DEC 2001 04:55PM Bob Carten wrote:
Mike:
You can can run the default event through a commuter module, if you want. Have the commuter module return the default value, rather than a 1 or a zero.
For your specific app, try DO_EVENT('@SELF','DEFAULT',colnum), where colnum is the number of the column to default.
Edit Do_Event to add a case for Default.
Bob
Bob
At 03 DEC 2001 05:21PM Donald Bakke wrote:
Mike,
We generally create a custom function to handle all of the defaults from a given form. Just enter the function name in the control Properties dialog box. Make sure you also include open and close parenthesis. If you like, you can pass a literal parameter such as the control name. We generally don't pass parameters and just let the function determine what control has focus and if it's an edittable what the SELPOS is.
Your function only needs to return the default value and it will then appear in your control like a normal Windows default entry.
dbakke@srpcs.com
At 05 DEC 2001 02:12PM Mike O'Neal wrote:
Don and Bob, thanks much,
Mike