mvDEcho

subroutine mvDEcho

***************************************************************************

* mvDEcho: Echo all fields back to an mvDesigner Server as a non-persistent

*            page.

***************************************************************************

*

include wbp w3Include

values     = ""

formanme   = ""

* list of variables to not manually add

skip     = ""

skip<-1> = "w3Exec"

skip<-1> = "w3ServerPool"

skip<-1> = "w3Debug"

skip<-1> = "w3User"

skip<-1> = "w3UserPass"

skip<-1> = "formname"

skip<-1> = "w3SessionId"

skip<-1> = "w3ProfileId"

skip<-1> = "w3USERPASSWORD"

call w3GetValAll(values)

locate("FORMNAME", values, 1; loc) then

      formname = values<2,loc>

end else

      formname = "Not Set"

      call w3log("mvDEcho", "No formname set")

end

call w3mvDInit(formname, "")

cnt = dcount(values<1>, @VM)

for i = 1 to cnt

    locate(values<1, i>, skip; loc) else

         temp = values<2,i>

         convert @svm to @vm in temp

         x = mod(i,4)

         if x = 0 then flag = p_UCV_SELECTED

         if x = 1 then flag = 0

         if x = 2 then flag = p_UCV_FOCUS

         if x = 3 then flag = p_UCV_FOCUS + p_UCV_SELECTED

         call w3mvDInsert(values<1, i>, temp, flag)

    end

next i

err = ""

call w3mvDInput(err, 0, "")

if err # w3_OK then

   call w3Log("mvDEcho", "w3mvDInput returned: ":err)

end

return