I have an hierarchical app. I have created a table of main entries. I then created child entries. I have used NuBuilderPro to build a browse form and an edit form for the main entries. On the edit form I have a subform with a grid for the child entries. I would like to allow a user to click on one of the subform rows (almost any way that works would be okay) to launch an edit form for the child that will have on it a subform of grandchildren. Once I can do one level then I should be able to keep going.
Thank you.
Bill Bailey
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
launch an edit form from a subform
Re: launch an edit form from a subform
WRBailey,
On your subform, create a button with an event like this.
and create a function like this (in the Custom Code > Javascript Tab of the Form)..
Hope this helps
Steven
On your subform, create a button with an event like this.
and create a function like this (in the Custom Code > Javascript Tab of the Form)..
Code: Select all
function openChild(t){
var rw = $('#' + t.id).attr('data-prefix') //-- current row in subform
var id = rw + '_nuPrimaryKey'; //-- Primary Key for record in subform
var fpk = '53e0208f324b6b8'; //-- Form Primary Key
var rpk = $('#' + id).val(); //-- Record Primary Key
window.nuControlKey = true; //-- simulate holding down CRTL (open in new Tab)
nuOpenForm('', '', fpk, rpk);
window.nuControlKey = false;
}
Steven
You do not have the required permissions to view the files attached to this post.
-
- Posts: 13
- Joined: Fri Jun 06, 2014 9:44 am
Re: launch an edit form from a subform
Thank you, Steve. I guess I'm not as far along as I thought.
I have another question.
I only know how to use the subform wizard to create a subform and the subform I created is a grid. Therefore I don't know how to create a button within a row of my subform. I tried adding an object but it tells me the column doesn't exist. So I tried it without a name and the subform works but it has nothing about the column with no name.
How do I add a button to my subform?
Thanks again.
Bill
I have another question.
I only know how to use the subform wizard to create a subform and the subform I created is a grid. Therefore I don't know how to create a button within a row of my subform. I tried adding an object but it tells me the column doesn't exist. So I tried it without a name and the subform works but it has nothing about the column with no name.
How do I add a button to my subform?
Thanks again.
Bill
Re: launch an edit form from a subform
Bill,
The easiest way to create a button on a subform that already has an Object on it is to clone the one there and change its properties (eg. Type to Button).
To bring up a Subform Object's properties, double click its title as the black circles suggest here.. http://wiki.nubuilder.net/index.php/Developer_Tools
Steven
The easiest way to create a button on a subform that already has an Object on it is to clone the one there and change its properties (eg. Type to Button).
To bring up a Subform Object's properties, double click its title as the black circles suggest here.. http://wiki.nubuilder.net/index.php/Developer_Tools
Steven