Alpha DevCon 2018
Results 1 to 3 of 3

Thread: Creating Next and Prev function within Form View control

  1. #1
    Member
    Real Name
    Todd
    Join Date
    Oct 2008
    Posts
    19

    Default Creating Next and Prev function within Form View control

    I see that the Beta has an example of advancing 'Next and Previous' through Form View. Are these functions going to be added as pre-defined controls within the Form View control?

    Is there a video explaining how and where to create this navigation?

  2. #2
    Member
    Real Name
    Todd
    Join Date
    Oct 2008
    Posts
    19

    Default Re: Creating Next and Prev function within Form View control

    Quote Originally Posted by Td203 View Post
    I see that the Beta has an example of advancing 'Next and Previous' through Form View. Are these functions going to be added as pre-defined controls within the Form View control?

    Is there a video explaining how and where to create this navigation?
    This learning curve thing always makes me feel stupid until I find what I'm looking for and then the answer seems so simple.



    {dialog.object}.formViewNavigate(UXformViewControlId,direction);

  3. #3
    Alpha Software Employee Beta Spark's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    391

    Default Re: Creating Next and Prev function within Form View control

    Quote Originally Posted by Td203 View Post
    This learning curve thing always makes me feel stupid until I find what I'm looking for and then the answer seems so simple.

    {dialog.object}.formViewNavigate(UXformViewControlId,direction);
    Glad to see you found a solution, Todd!

    My apologies for the delayed response - I was out of town.

    As you discovered, you can use the {dialog.object}.formViewNavigate method to navigate through the fields on a FormView control:
    {dialog.object}.formViewNavigate(UXformViewControlId, direction)

    The direction accepts the following values for navigation:
    • next
    • prev
    • first
    • last


    EG:
    Code:
    // Navigate to First field in FORMVIEW_1
    {dialog.object}.formViewNavigate("FORMVIEW_1","first");
    
    //Navigate to Last field in FORMVIEW_1
    {dialog.object}.formViewNavigate("FORMVIEW_1","last");
    
    //Navigate to Next field in FORMVIEW_1
    {dialog.object}.formViewNavigate("FORMVIEW_1","next");
    
    //Navigate to Previous field in FORMVIEW_1
    {dialog.object}.formViewNavigate("FORMVIEW_1","prev");
    You can call the javascript method manually. However, this can also be done using Action Javascript.

    You can use the "Form View Control Actions" Action Javascript to create the buttons for navigating the Form View. You can setup the action as follows.

    1. Select "Form View Control Actions" from the list of Action Javascript

    formViewAction.png

    2. Select "Navigate" for the "Action Name" property

    formViewAction_Navigate.png

    3. Pick which navigation action you want to perform on the Form View control selected for the "Form View Control Id" property.

    formViewActions_NavigateConfigure.png

    Other actions you can perform using "Form View Control Actions" include:
    • Set Form View field value - Set the value in a Form View control. This is done using a Javascript that returns the value to set in the field.
    • Refresh - Reload the original data from the data source into the Form View
    • Clear Errors - Clear all the errors shown in the Form View.
    • Commit - Commit or "save" the data in the Form View to the Form View's data source.
    • Populate Form - Populate the Form View with some data. This is done via a call to a a Javascript function you create that returns an object (JSON) that contains the properties for each field in the form.
    • New Record - Display a new record in the Form View.


    If you want to know more about the "Navigate" action any of the other Form View control actions or if there is an action you'd like to perform that isn't listed, let me know! Thanks!
    Sarah Mitchell

    Looking for answers? Try our documentation.
    If you can't find something, let us know!

Similar Threads

  1. Replies: 1
    Last Post: 05-26-2015, 11:02 PM
  2. how to get session variable passed from prev-prev (not typo ^ ^) grid through javascript?
    By jennygong in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 01-25-2014, 05:43 PM
  3. Trouble Creating Function
    By cdibi in forum Alpha Five Version 9 - Desktop Applications
    Replies: 7
    Last Post: 05-18-2008, 10:27 AM
  4. View MS Word document within control on form?
    By dodgebros in forum Alpha Five Version 7
    Replies: 7
    Last Post: 11-28-2007, 08:25 AM
  5. Lookup function vs creating set
    By Lawrence Fox in forum Alpha Five Version 5
    Replies: 10
    Last Post: 07-17-2003, 12:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •