{{tag>category:"OpenInsight 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]] ==== Returning Record on a collector form (OpenInsight Specific) ==== === At 26 JAN 1998 11:38:03AM Mark wrote: === I am attempting to extract all values from a collector form using the follwing: Record=Get_Property(@Window, "RECORD"); This returns nothing. However, I can return one control at a time using Get_Property("Form.ControlName","TEXT"). I need to know the command syntax to return all controls from a collector window using one command, if possible. Thanks. ---- === At 26 JAN 1998 01:18PM Cameron Revelation wrote: === Mark, [i]I need to know the command syntax to return all controls from a collector window using one command, if possible.[/i] There are several ways to do what you are requesting. One of the handiest features of properties is the ability to get and set [i]en masse[/i]. As an example: subroutine End_Collector(void) declare subroutine End_Dialog Ctrls=Get_Property(@window, "CTRLMAP") convert @fm to @rm in Ctrls Vals=Get_Property(Ctrls, "DEFPROP") convert @rm to @vm in Ctrls convert @rm:@fm:@vm to @vm:@svm:@tm in Vals List=Ctrls: @fm: Vals End_Dialog(@window, List) Execute the above subroutine to close the collector dialog, for example, on the "OK" button. The code to extract a value from the list of values returned is simple: function Extract_Field(List, Ctrl) locate Ctrl in List using @vm setting Pos then Val=List convert @svm:@tm to @fm:@vm in Val return Val end else return "" end The dialog callee would have code like: * call the login dialog which has controls NAME and PASSWORD Ret =Dialog_Box("LOGIN_DIALOG", @window) Name=Extract_Field(Ret, "NAME") Pwd =Extract_Field(Ret, "PASSWORD") Cameron Purdy info@revelation.com [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=FC7695ACD2246ED385256598005B6003|View this thread on the forum...]]