Welcome to the nuBuilder Forums!

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

Populating form display with more than one column

Questions related to using nuBuilder Forte.
Post Reply
bobbyrabbit
Posts: 4
Joined: Mon Dec 02, 2019 11:06 am

Populating form display with more than one column

Unread post by bobbyrabbit »

First post, wonderful product..thanks.

I have a table fs_students and am pulling data from column nok_firstname from table fs_nok

You can see this in the page properties display section and is functioning correctly using fs_nok.nok_firstname
I would also like to add nok_lastname to that display.

I'm guessing it would be something similar to fs_nok.nok_firstname & " " & fs_nok.nok_lastname
I'm quite new to this, hope it makes sense
Is this possible?

With thanks
Screenshot 2019-12-04 at 23.13.46.png
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Populating form display with more than one column

Unread post by admin »

bobbyrabbit,

Try this (MySQL function)

CONCAT(fs_nok.nok_firstname, " ",fs_nok.nok_lastname);
bobbyrabbit
Posts: 4
Joined: Mon Dec 02, 2019 11:06 am

Re: Populating form display with more than one column

Unread post by bobbyrabbit »

Thanks for the quick reply. Where would I enter the CONCAT line, my current code in the SQL Builder is:

Code: Select all

SELECT
    fs_students.*,
    fs_nok.*

FROM
    fs_students
        JOIN fs_nok ON fs_nok.fs_nok_id = fs_students.nok
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Populating form display with more than one column

Unread post by kev1n »

It can be added in the display field
You do not have the required permissions to view the files attached to this post.
bobbyrabbit
Posts: 4
Joined: Mon Dec 02, 2019 11:06 am

Re: Populating form display with more than one column

Unread post by bobbyrabbit »

Thanks, I put it in the display field initially, it was the semi-colon at the end of the code causing a problem. Now displays perfectly.
I get the information from a dropdown box in the edit section, how do I add the CONCAT code so it also shows first and last name in the dropdown box? Is that in the Form Object List section?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Populating form display with more than one column

Unread post by kev1n »

Yes, under Form Object List, then select the object and enter an SQL.
You do not have the required permissions to view the files attached to this post.
bobbyrabbit
Posts: 4
Joined: Mon Dec 02, 2019 11:06 am

Re: Populating form display with more than one column

Unread post by bobbyrabbit »

Thanks so much guys.
For reference, dropdown box fixed like so:

SELECT
fs_nok.fs_nok_id, CONCAT(fs_nok.nok_firstname, " ",fs_nok.nok_lastname)

FROM
fs_nok
Post Reply