Page 1 of 1

Copying Data from Popup Form to Main Form

Posted: Sat Jul 26, 2025 10:29 pm
by yvesf
Hello,

I have two forms linked via the patient_id.

The main form is a browse and edit form.

It has a button that opens a popup form (edit form).

In the popup, there's a note field (a text area).
I would like to copy the content of this note field into the main form, specifically into a textarea field called cs_CR.

I tried using the following code behind a button in the popup:

Code: Select all

nuSetValue('parent.cs_CR', nuGetValue('note'));
But it doesn't work — apparently the main form’s fields are not accessible from the popup. The console reports that the object does not exist.

One possible solution would be to call a server-side procedure to update the main form field.
However, I'm wondering if there's a simpler or cleaner alternative to achieve this?

Thanks a lot for your continuous help.

Yves

Re: Copying Data from Popup Form to Main Form

Posted: Sat Jul 26, 2025 10:59 pm
by kev1n
parent.nuSetValue('cs_CR', nuGetValue('note')); ?

Re: Copying Data from Popup Form to Main Form

Posted: Sun Jul 27, 2025 1:29 am
by yvesf
THX KEV1N !!! the correct syntax is this one.