Hi,
I'm trying to return two concatenated fields from a Browse Form to the description field of a lookup control.
My first attempt was to concatenate the fields directly in the query. Result: The Browse Form stays empty.
The 2nd attempt: By concatenating the fields in the Display row I can see the field appear on the Browse Form.
Now my question is how I can pass that "fullname" field to the lookup control? Adding an alias for the concatenated fields (like CONCAT(gd_vorname, ' ', gd_nachname) as full_name) doesn't work.
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.
Lookup Control / return concatenated fields Topic is solved
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Lookup Control / return concatenated fields
You do not have the required permissions to view the files attached to this post.
Re: Lookup Control / return concatenated fields
toms,
Try this...
Steven
Try this...
Steven
You do not have the required permissions to view the files attached to this post.
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: Lookup Control / return concatenated fields
Steven,
Thank you, it works like this. Why didn't I think of that...?
Thank you, it works like this. Why didn't I think of that...?
Re: Lookup Control / return concatenated fields
toms,
It will only work with fields from the table connected to the Lookup.
Not fields from any SQL joins.
If you want to do something more complicated, like how much a customer owes.
You could do that with PHP in After Browse.
You could do something like this...
Steven
It will only work with fields from the table connected to the Lookup.
Not fields from any SQL joins.
If you want to do something more complicated, like how much a customer owes.
You could do that with PHP in After Browse.
You could do something like this...
Code: Select all
$lur = nuLookupRecord();
$i = $lur->ID;
$s = "
SELECT SUM(inv_total)
WHERE inv_paid = '0'
AND inv_customer_id = '$i'
";
$t = nuRunQuery($s);
$r = db_fetch_row($t);
nuSetFormValue('rep_customer_iddescription', "Currently owing : " . $r[0]);
You do not have the required permissions to view the files attached to this post.
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: Lookup Control / return concatenated fields
Steven,
Thanks for the additional example. I've just nuLookupRecord() so far but not in combination with
nuRunQuery() etc.
Thanks for the additional example. I've just nuLookupRecord() so far but not in combination with
nuRunQuery() etc.