
Originally Posted by
Td203
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:
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!
Bookmarks