Page 1 of 1

Browse Form inside an Edit Form how to update foreign key

Posted: Fri Jul 06, 2012 3:55 pm
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

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

Posted: Fri Jul 06, 2012 6:55 pm
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

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

Posted: Fri Jul 06, 2012 7:12 pm
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

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

Posted: Fri Jul 06, 2012 7:23 pm
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

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

Posted: Fri Jul 06, 2012 10:38 pm
by johan
Steven,

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


Johan

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

Posted: Fri Jul 06, 2012 11:51 pm
by admin
.