NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Johan van Zyl on January 05, 2012, 06:09:21 AM

Title: Running Source Procedure from menu
Post by: Johan van Zyl on January 05, 2012, 06:09:21 AM
I would like this code to execute, preferably from a Menu Choice
eg Utilities/Fix Employees
but apparently one cannot call a Source procedure from a menu choice?
So how and where can I go about it?

    set(Employees)
    loop until Access:Employees.Next()

        If   clip(EMP:EmployeeLastName) ='' or len(clip(EMP:EmployeeLastName)) = 1
              EMP:EmployeeLastName = '* Last Name Field EMPTY *'
        end
         EMP:EmployeeCombinedName = clip(EMP:EmployeeLastName)&' '&clip(EMP:EmployeeInitials)&' '&(EMP:EmployeeTitle)&' '&clip(EMP:AlsoKnownAs)
           IF EMP:IsPostalSameAsPhysical
              EMP:PostalAddress1 = EMP:PhysicalAddress1
              EMP:PostalAddress2 = EMP:PhysicalAddress2
              EMP:PostalAddress3 = EMP:PhysicalAddress3
              EMP:PostalAddressPCode = EMP:PhysicalAddressPCode
            end
        Access:Employees.Update()
       
    end
   
Thx
Title: Re: Running Source Procedure from menu
Post by: Bruce on January 05, 2012, 06:54:43 AM
When the user selects the menu item, you'll want there to be "some response" so they know what is happening.

the way I'd probably do it is to open a WebForm, which contains some text on what is about to happen, with a Start button. Then when they click start you can call a procedure that does your code (probably a normal Source procedure, albeit one that takes p_web as a parameter) - then you can show a progress bar so the user can see how long the process is taking.

you'll want to check the Upgrade-to-NT6 doc, and play around with the Start button and Progress bars to get it working. But I think that'll give the most feedback to the end user.

cheers
Bruce
Title: Re: Running Source Procedure from menu
Post by: Johan van Zyl on January 05, 2012, 09:01:19 AM
Thx Bruce

On this WebForm, can I have various Start buttons ie from one form run different Source Procedures?
Title: Re: Running Source Procedure from menu
Post by: bruce2 on January 05, 2012, 08:12:11 PM
Yes