Page 1 of 1

Lookup Control / populate fields

Posted: Mon Dec 18, 2017 8:37 pm
by toms
Hi,

NuBuilder V3 provided a way to "quickly find and populate fields from what could be a massive list of records.
Once selected it not only populates the ID, Code and Description fields of itself, it can also update other fields on the Edit Form using either fields directly available in the searchable or related tables, from hard coded values, SQL functions or even customised PHP functions."

Apparently, NuBuilderForte does not offer this functionality. Have I missed something?

Image

Re: Lookup Control / populate fields

Posted: Mon Dec 18, 2017 9:39 pm
by admin
toms,

You are not missing anything, we have taken out that subform and replaced it with 2 PHP functions that do the same but allow you more control.

The subform in v3 only allowed the choice of values that were in the chosen row or a complex user-defined function.

This works much simpler.

You can see it being used in a couple of times in our sped up demo.

Here is one... https://www.youtube.com/watch?v=tdh9ILCUAco&start=164

So updating an invoice's address fields from the customer is done like this...

Code: Select all


$l = nuLookupRecord();

nuSetFormValue('inv_address1', $l->cus_address1);
nuSetFormValue('inv_address2', $l->cus_address2);
nuSetFormValue('inv_address3', $l->cus_address3);

This allows you to get more complex information before populating the Edit Form.

Its the only place that now requires code that didn't in v3.

We did this because we wanted to reduce the complexity that a new user sees on the screen.


Steven

Re: Lookup Control / populate fields

Posted: Tue Dec 19, 2017 9:20 am
by toms
Thanks Steve, this works perfectly! I only had to add an ending single quote after the addressX-fields to make the syntax correct.

Code: Select all

nuSetFormValue('inv_address1', $l->cus_address1);

Re: Lookup Control / populate fields

Posted: Tue Dec 19, 2017 1:19 pm
by admin
.