Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Edit a record on a nuPopup frame

Questions related to using nuBuilder Forte.
Post Reply
skyline101
Posts: 27
Joined: Wed Jul 21, 2021 11:26 pm
Been thanked: 1 time

Edit a record on a nuPopup frame

Unread post by skyline101 »

HI

My attached graphic shows the edit section of a Browse and Edit form (Vendor Detail). At the bottom of it, I have a Run object with another Browse and Edit form (Partner List - OLD).

Question. What is the JavaScript needed on the Custom Code so if I were to click on any record from the Run object, it can bring the record on a nuPopup frame rather than the normal edit-breadcrumb?

I have tried the following custom code

Code: Select all

if(nuFormType() == 'browse'){nuPopup('myformid', 'pk', '');}
but when I click on any record on my Partner List - OLD run object, it does not do a popup, it just opens normally as a breadcrumb within the run object.

I have looked through the forums and tried different JavaScript functions, but I cannot get the record to do a popup.

Thank you for your help.
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Edit a record on a nuPopup frame

Unread post by kev1n »

Overwrite nuSelectBrowse
skyline101
Posts: 27
Joined: Wed Jul 21, 2021 11:26 pm
Been thanked: 1 time

Re: Edit a record on a nuPopup frame

Unread post by skyline101 »

Hi Kevin

Thank you for your help.

I am leaving here the code I used so it can help anybody looking for it on the forums:

Code: Select all

function nuSelectBrowse(e){
    
    var r   = $('#' + e.target.id).attr('data-nu-primary-key');

    nuPopup('form_id', r, '');
}
ChrisW
Posts: 4
Joined: Tue Jun 06, 2023 2:24 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Edit a record on a nuPopup frame

Unread post by ChrisW »

skyline101 wrote: Thu Aug 26, 2021 7:48 pm Hi Kevin

Thank you for your help.

I am leaving here the code I used so it can help anybody looking for it on the forums:

Code: Select all

function nuSelectBrowse(e){
    
    var r   = $('#' + e.target.id).attr('data-nu-primary-key');

    nuPopup('form_id', r, '');
}
Hi Skyline101,

your code was not working for me, so I went to the nuSelectBrowse() and nuPopup(). Compared them and this one is working:

Code: Select all

function nuSelectBrowse(event, element) {
    const primaryKey = $(element).attr('data-nu-primary-key');
    nuPopup(nuFormId(), primaryKey, '', '');
}
Thanks for putting me in the right direction :-)

BR,
Chris
Last edited by ChrisW on Sat Jun 24, 2023 8:43 am, edited 2 times in total.
Post Reply