Welcome to the nuBuilder Forums!

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

Create a new record from an filtered iframe Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Create a new record from an filtered iframe

Unread post by yvesf »

Hello,

I would to create a new record from a filtered iframe. I would like to know what is the best approach with nubuilder.
Here is the situation :
I created a tasks manager system in with I can easily create :
- a task and assigned it to the right people
- when I am on the people profile, I have an iframe listing all the related tasks to this people. From here I would like to create a new task.
By using the add button, I will be able to create a new task but I have to reassign to the right person. How can I be able to pass the current people as parameter from here to create a new task ?
Thx.
Attached the tasks manager which I am talking about.
09-16-2024_083935_66e7d2a72c25b_nuBuilder_backup.sql.gzip
and the related video
Video_2024-09-16_085705.gif
You do not have the required permissions to view the files attached to this post.
Last edited by yvesf on Wed Sep 18, 2024 7:28 am, edited 1 time in total.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Create a new record from an filtered iframe

Unread post by yvesf »

Hello,

I have found a solution .
behind task form on custom code tab behind edit

Code: Select all

if (nuIsNewRecord()) {
 if (parent.nuGetValue('pra_user')!= "") {
     nuSetValue('tsk_assigned_to_id', parent.nuGetValue('pra_user'));
     nuHide('tsk_assigned_to_id');
 }
}
Thx,

Yves
You do not have the required permissions to view the files attached to this post.
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: Create a new record from an filtered iframe

Unread post by steven »

Hi yvesf,

I think your problem would be solved best by using an extra "linking" table and a Subform.

rel.png
frm.png


And I added some styles too...

sty.png

You can find it all in nub.zip


Steven
You do not have the required permissions to view the files attached to this post.
A short post is a good post.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Create a new record from an filtered iframe

Unread post by yvesf »

Steven,

Your solution is probably better than mine as my approach is probably less in the nubuilder spirit (low code approach).
Moreover using filtering iframe costs probably more on the server if you have a lot of tasks to manage.
It means that the mindset should be different in regards to the architecture of a nubuilder app.
Many thanks for that. Appreciate a lot your feedback. If you could confirm my feelings :-).

Yves
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Create a new record from an filtered iframe

Unread post by yvesf »

@steven,

The proposed approach to implement the link between tasks and assigned user from the user profile is elegant but doesn't completely solve what I am trying to achieve. Why ?
Because I would like to activate 2 workflows to make the assignment of tasks :
Workflow 1 : From a profile, create a new task
Workflow 2 : Create a task and assign it the the right people. (not covered by your proposal)
.
What should be your proposal to implement workflow 2 ?
Subsidiary question : how can you assign a task to multiple users ?
Many thanks,

Yves
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: Create a new record from an filtered iframe

Unread post by steven »

Hi yvesf,

For Workflow 2, what I did was...

Clone the Subform Object .
Clone the Subform's surrounding Content Box. - which I forgot to change the title on.

Create a new Subform - same table but with the Lookup Object looking at Users and the task ID being the Foreign key.
Change the Lookup's Subform to look at nuuser.


People & Tasks - Video

nu.zip


Steven
You do not have the required permissions to view the files attached to this post.
A short post is a good post.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Create a new record from an filtered iframe

Unread post by yvesf »

Many thanks Steven.
But if I create a task and assign it to Bob
assigned_task.png
and select bob I don't have its related task ie task 1.
affected_task.png
If I save it without adding a task no more result; It doesn't delete the association between task and practician but it doesn't refresh the list of tasks.
Any idea ?
Thx
You do not have the required permissions to view the files attached to this post.
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: Create a new record from an filtered iframe

Unread post by steven »

Hi yvesf,

Try this...

n.zip
Steven
You do not have the required permissions to view the files attached to this post.
A short post is a good post.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Create a new record from an filtered iframe

Unread post by yvesf »

excellent. Thx
Post Reply