Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Subform row id - hash cookie
-
- Posts: 17
- Joined: Sat Jan 06, 2018 5:45 pm
Subform row id - hash cookie
I'm trying to create a button that opens the record from another table to be edited but I can not do it because I do not know the record_id of the row from the subform to insert it into the filter field.
The field "Nr Top" holds the id field of "Parcele extravilan" form, i put the id field in the browse of "Parcele extravilan"
What am I doing wrong?
THX
The field "Nr Top" holds the id field of "Parcele extravilan" form, i put the id field in the browse of "Parcele extravilan"
What am I doing wrong?
THX
You do not have the required permissions to view the files attached to this post.
Re: Subform row id - hash cookie
tovidiu,
Great question.
Instead of using a Run Object, use an Input Object and set its Type to Button (they should still look the same).
Add an onclick Event via its Custom Code Tab with the following Javascript.
Here is some help in the wiki ...
http://wiki.nubuilder.net/nubuilderfort ... ab_-_Input
http://wiki.nubuilder.net/nubuilderfort ... pt#nuPopup
http://wiki.nubuilder.net/nubuilderfort ... bformRowId
Steven
Great question.
Instead of using a Run Object, use an Input Object and set its Type to Button (they should still look the same).
Add an onclick Event via its Custom Code Tab with the following Javascript.
Code: Select all
nuPopup('aaaa', nuSubformRowId(this)); //-- make aaaa the id of the Form you would like to open
http://wiki.nubuilder.net/nubuilderfort ... ab_-_Input
http://wiki.nubuilder.net/nubuilderfort ... pt#nuPopup
http://wiki.nubuilder.net/nubuilderfort ... bformRowId
Steven
-
- Posts: 17
- Joined: Sat Jan 06, 2018 5:45 pm
Re: Subform row id - hash cookie
Thanks for the reply,
I did as you said but it does not work, nothing happens when I click on the button.
this is the code
I modified the code according to the parameters "noPopup (string1, string2, string3)" as follows
but it still does not work.
in this version should open the form '5a29ddbd60e1aa9' as browse with filter nuSubformRowId(this), but stil nothing happens. As if it did not read the row id of the subform.
it is possible to use the following code? I want to use the lookup field not the subform row id, because like this it will open up directly in Edit form
Ovidiu
I did as you said but it does not work, nothing happens when I click on the button.
this is the code
Code: Select all
nuPopup('5a29ddbd60e1aa9', nuSubformRowId(this));
Code: Select all
nuPopup('5a29ddbd60e1aa9', '', nuSubformRowId(this));
in this version should open the form '5a29ddbd60e1aa9' as browse with filter nuSubformRowId(this), but stil nothing happens. As if it did not read the row id of the subform.
it is possible to use the following code? I want to use the lookup field not the subform row id, because like this it will open up directly in Edit form
Code: Select all
nuPopup('5a29ddbd60e1aa9','lookup_field');
Re: Subform row id - hash cookie
Ovidiu,
You will need the lastest from github because I just added nuSubformRowId().
If you want the value from a Lookup or other Object try...
Steven
You will need the lastest from github because I just added nuSubformRowId().
If you want the value from a Lookup or other Object try...
Code: Select all
nuSubformValue(this, 'ite_product_id');
Steven
-
- Posts: 17
- Joined: Sat Jan 06, 2018 5:45 pm
-
- Posts: 17
- Joined: Sat Jan 06, 2018 5:45 pm
Re: Subform row id - hash cookie
And if I have the same case but the lookup object and the button are in form not subform, how can i read the lookup value to use it in Javascript?
for example:
Ovidiu
for example:
Code: Select all
nuPopup('5a29ddbd60e1aa9', nuFormValue(this, 'lookup_field'));
Re: Subform row id - hash cookie
Ovidiu,
If your Object is on an Edit Form, you can get the value this way...
Here are other ways you can use this $() jQuery function... https://www.w3schools.com/jquery/jquery ... ectors.asp
Steven
If your Object is on an Edit Form, you can get the value this way...
Code: Select all
var v = $('#lookup_field_id').val(); //-- the Object's ID prefixed by a #
Steven
-
- Posts: 17
- Joined: Sat Jan 06, 2018 5:45 pm