USP_DATAFORMTEMPLATE_VIEW_MKTLISTLAYOUT_FINDERFILE
The load procedure used by the view dataform template "Finder File Layout View Form"
Parameters
| Parameter | Parameter Type | Mode | Description | 
|---|---|---|---|
| @ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. | 
| @DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. | 
| @NAME | nvarchar(50) | INOUT | Name | 
| @DESCRIPTION | nvarchar(100) | INOUT | Description | 
| @LAYOUTFIELDS | xml | INOUT | Field list | 
| @LAYOUTLISTFINDERFILES | xml | INOUT | Finder files imported using this layout | 
| @ADDNEWCODETABLEENTRIES | bit | INOUT | 
Definition
 Copy 
                                    
CREATE procedure dbo.[USP_DATAFORMTEMPLATE_VIEW_MKTLISTLAYOUT_FINDERFILE]
(
  @ID uniqueidentifier,
  @DATALOADED bit = 0 output,
  @NAME nvarchar(50) = null output,
  @DESCRIPTION nvarchar(100) = null output,
  @LAYOUTFIELDS xml = null output,
  @LAYOUTLISTFINDERFILES xml = null output,
  @ADDNEWCODETABLEENTRIES bit = null output
)
as
  set nocount on;
  set @DATALOADED = 0;
  select
    @DATALOADED = 1,
    @NAME = [NAME],
    @DESCRIPTION = [DESCRIPTION],
    @ADDNEWCODETABLEENTRIES = [ADDNEWCODETABLEENTRIES]
  from dbo.[MKTLISTLAYOUT]
  where [ID] = @ID;
  if @DATALOADED = 1
    begin
      set @LAYOUTFIELDS = (
        select
          [FRIENDLYNAME],
          [FIELDNAME],
          [SOURCENAME] as [LAYOUTNAME]
        from [MKTLISTLAYOUTFIELD]
        where [LISTLAYOUTID] = @ID
        for xml raw('ITEM'), type, elements, root('LAYOUTFIELDS'), binary base64);
      set @LAYOUTLISTFINDERFILES = (
        select
          [NAME],
          [STATUS],
          [DATEADDED]
        from [MKTFINDERFILEIMPORTPROCESS]
        where [LISTLAYOUTID] = @ID
        for xml raw('ITEM'), type, elements, root('LAYOUTLISTFINDERFILES'), binary base64);
    end
  return 0;