Welcome to the nuBuilder Forums!

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

Tab-Select with list shows hidden value in Browse view

Questions related to using nuBuilder Forte.
Post Reply
niek
Posts: 5
Joined: Wed Sep 05, 2018 10:08 pm

Tab-Select with list shows hidden value in Browse view

Unread post by niek »

Hi there,
I have just started discovering NuBuilder. In building my first DB I wanted to include a Yes/No field and decided that the Select object with a list (0|No|1!Yes) would do fine. It works very well in Edit View, but in the Browse View it shows the real database values 0 and 1, instead of No and Yes. Is that normal behaviour or is there a trick to also show No and Yes in the Browse View?
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Tab-Select with list shows hidden value in Browse view

Unread post by toms »

Hi niek
niek wrote: Is that normal behaviour or is there a trick to also show No and Yes in the Browse View?
Yes, that's the standard behaviour. In your case, and what I usually do to display boolean values, is this:

Go to Form Properties, and modify the SQL in the Display column:
display_properties.JPG
REPLACE(REPLACE(your_field,1,'Yes'),0,'No')

I also like to use a check mark character. Then you better see the "Yes" values

Code: Select all

REPLACE(REPLACE(your_field,1,'✔'),0,'')
This would look like this:
active_tick.JPG
You do not have the required permissions to view the files attached to this post.
niek
Posts: 5
Joined: Wed Sep 05, 2018 10:08 pm

Unread post by niek »

Thanks Toms!
I didn't realise that the Display field could except all kinds of SQL statements. That might come in handy in other places as well!
niek
Posts: 5
Joined: Wed Sep 05, 2018 10:08 pm

Re: Tab-Select with list shows hidden value in Browse view

Unread post by niek »

One more question if I may. How do you insert the tick mark? For me it will not show. When I save the sql-code, it changes the tick mark in a question mark.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Tab-Select with list shows hidden value in Browse view

Unread post by toms »

niek wrote:One more question if I may. How do you insert the tick mark? For me it will not show. When I save the sql-code, it changes the tick mark in a question mark.
This has to do with the database (table/field) collation. If you change it e.g. to utf8_general_ci, it will be saved as tick mark.

Change it in phpMyAdmin, under Opeations:
phpmyadmin_collation.JPG
(It's likely that an error is occurring when you attempt to change the collation because phpMyAdmin is trying to set it for views as well. Just ignore the error.)
You do not have the required permissions to view the files attached to this post.
niek
Posts: 5
Joined: Wed Sep 05, 2018 10:08 pm

Re: Tab-Select with list shows hidden value in Browse view

Unread post by niek »

That had been in my mind already and the whole database already has utf8_general_ci as collation, but despite that the tick mark doesn't hold.
niek
Posts: 5
Joined: Wed Sep 05, 2018 10:08 pm

Re: Tab-Select with list shows hidden value in Browse view

Unread post by niek »

With a better look at the nuBuilder database I saw that indeed there were two tables that had a latin_swedish_ci collation. These were exactly the two tables that had to do with the select objects. They were not changed with the change on the whole database as you mentioned above. Maybe because they come just after the two view-tables on which the procedure gave an error.

Anyhow, I changed these two tables individually to utf8 and like magic the tick mark appeared. Looks so much nicer indeed!
Thanks for your hint. Because of that I took a better look than at first instance.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Tab-Select with list shows hidden value in Browse view

Unread post by admin »

.
Post Reply