{{tag>category:"OpenInsight 32-bit Specific"}} [[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Edit Line Properties, "Default" Field (OpenInsight 32-bit Specific) ==== === At 26 FEB 2004 04:48:16PM Charlie Engler wrote: === Hello, Just made the move to OI7 and ran across my first problem. I wrote a function to supply a default value to a field. On the Edit Line Properties window in the "Default" field, I placed the name of my custom function. Each time the focus switches to the field, the function is processed correctly but then the form crashes and the debugger opens with the following error message: "Eng0010: OIWIN_GOTFOCUS, Line 2. Variable has not been assigned a value." I've tried this function on different fields, different forms and different applications, including SYSPROG. I even wrote a very simple function to see if that might be the problem...same results. I've made no changes to my system since installing OI7. Any suggestions? Thanks, Charlie ---- === At 27 FEB 2004 02:58AM The Sprezzatura Group wrote: === A default function must be a function, and have the return results returned as part of the return statement. So, when testing this Subroutine TestDefault( Void ) RetVal=OConv( Time(),'MTS') @ANS=RetVal Return we received the same error. However, FunctionTestDefault( Void ) RetVal=OConv( Time(),'MTS') Return RetVal happily placed the time into our test prompt. The Sprezzatura Group [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 27 FEB 2004 08:14AM Charlie Engler wrote: === Thanks, it works great now. I've got to shift my thinking from the world of AREV RBasic to OI Basic+. Charlie [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=3F1EAEB3AF9D34E885256E460077C6B4|View this thread on the forum...]]