Welcome to the nuBuilder Forums!

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

Browse Form inside an Edit Form how to update foreign key

Locked
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Browse Form inside an Edit Form how to update foreign key

Unread post by johan »

Another question about browse screen in edit form. I wan't to use it as a real subform where I only wan't to show the records depending on my form.

EX. I only wan't to show the invoice of that customer. But when I add a new (sub)form the foreign key is missing. Any idea how to solve this.

Thanks
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Browse Form inside an Edit Form how to update foreign ke

Unread post by admin »

johan,

As with a normal Browse Form, filtering is with strings not Foreign keys.

http://wiki.nubuilder.com/tiki-index.ph ... wse_Screen


By putting a hash variable of, say, the customer code from the Edit Form you are on (#cus_code#) in Default Filter for Browse Screen
This will filter anything matching that code.

But you need that customer code to be part of the Browse Form.

Steven
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: Browse Form inside an Edit Form how to update foreign ke

Unread post by johan »

Steven,

I asked my question wrong.

I already had solved that part but when I add a new record it has to put a FK in my table for the new record.

Pex.

client 1

order 1 fk 1
order 2 fk 1
order 3 fk 1

So I know which orders are from client 1.

The previous subform added the fk for each row. In this system (what i like better) it doesn't set FK.

Johan
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Browse Form inside an Edit Form how to update foreign ke

Unread post by admin »

johan,

I see what you mean but opening a new Edit Form is like any other, it has no relation to any other Edit Form.

Even if as in this case it is launched from inside another one.

The reason for putting a Browse in a Subform was not to give another way of adding a related record, but to display an infinite number of related records - something a normal subform couldn't.

Not the answer you were looking for.

Sorry.

Steven
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: Browse Form inside an Edit Form how to update foreign ke

Unread post by johan »

Steven,

That´s too bad. It would be nice if it just works like a subform.


Johan
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Browse Form inside an Edit Form how to update foreign ke

Unread post by admin »

.
Locked