I've spent months stuck on understanding this. Any help will be very appreciated.
I have an application to manage clinical record of patient.
One of the function is to help doctors in prescribing drugs, keeping record of previous prescription, providing a form to create new ones, and reports for printing.
Everything is fine and nuBuilder is such a great thing to use, but I can't find a way to accomplish what seems to be a small and simple task.
the mainly used form is a browse/edit for the 'paziente' database tab; it has several tabs for various iframes and subforms i.e. for clinical records, therapeutic planning, anagraphic infos. etc. An input text object with the primary key exist (paziente_id) under the tab 'anagrafica' of the form.
In the "ricette" tab, as an example, I have this iframe to display previous prescriptions to the patient (and eventually re-print them) and a button which opens an edit form for a new record of the 'ricette' tab.
And here it is the thing: in the opened edit form (code:0new_crea_ricetta) there's a field called 'ricetta_paziente_id' that should contain the value of the primary key ('paziente_id') mentioned above. How can i get this to be automatic?
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.
Improve editing new record
-
- Posts: 21
- Joined: Sat Jan 21, 2023 12:17 am
- Has thanked: 19 times
- Been thanked: 4 times
Improve editing new record
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Improve editing new record
Hi,
In the popup, add this JS in the form's Custom Code field:
In the popup, add this JS in the form's Custom Code field:
Code: Select all
if (nuIsNewRecord()) {
nuSetValue('ricetta_paziente_id', parent.nuRecordId());
}