Wiki

Scale Your Enterprise

User Tools

Site Tools


versago:versago_custom_procedures

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
versago:versago_custom_procedures [2020/05/11 12:10]
external edit
versago:versago_custom_procedures [2023/07/12 14:15] (current)
dlee [Obtaining Form Values]
Line 59: Line 59:
 To work with the appropriate dataset, it is necessary to first get the record key from the form data. Following is the basic SQL statement to set a processing variable to the record number (vgoRecNum) value on a form. “vgoRecNum” is the column name used for this example. The value used in your form may be different. To work with the appropriate dataset, it is necessary to first get the record key from the form data. Following is the basic SQL statement to set a processing variable to the record number (vgoRecNum) value on a form. “vgoRecNum” is the column name used for this example. The value used in your form may be different.
  
-<code sql>declare @vgoRecNum nvarchar(20)+<code> 
 +Sample SQL to extract fields from xml parameter @FormData (Header table)
  
-SELECT @vgoRecNum = frm.value('(vgoRecNum)[1]','nvarchar(20)') FROM @FormData.nodes('/formData'as HDR(frm); +DECLARE @formmode char(1),  
-</code>+ @text nvarchar(50), 
 + @number numeric(19,6), 
 + @date datetime 
 +  
 +SELECT @formmode = frm.value('(twbsformmode)[1]','char(1)'), 
 + @text = frm.value('(FormField1)[1]','nvarchar(50)')
 + @number = frm.value('(FormField2)[1]','numeric(19,6)'), 
 + @date = frm.value('(FormField3)[1]','datetime'
 +FROM @FormData.nodes('/formData'AS HDR(frm); 
  
 +FormField1, ..2, ..3 must match the Field Name in the form control settings. It is case sensitive
 +
 +---------------------------------------------------------------------------------------
 +
 +Sample SQL to extract fields from xml parameter @GridData (Detail table)
 +
 +SELECT frmdetail.value('(FormField1)[1]','nvarchar(50)') AS Col1,
 + frmdetail.value('(FormField2)[1]','numeric(19,6)') AS Col2,
 + frmdetail.value('(FormField3)[1]','datetime') AS Col3
 +INTO #TempTable
 +FROM @GridData.nodes('/GridData/Datas') AS DTL(frmdetail);
 +
 +FormField1, ..2, ..3 must match the Field Name in the form control settings. It is case sensitive
 +Use SQL cursor to process each record
 +</code>
 The same general statement can be used to obtain other values from the form data as well. The same general statement can be used to obtain other values from the form data as well.
  
versago/versago_custom_procedures.1589213430.txt.gz · Last modified: 2020/05/11 12:10 by