# Displaying BOOL values in a Browse List as "Y"

**URL:** <https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668>\
**Category:** questions\
**Tags:** c11\
**Created:** [November 13, 2022, 3:15pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668 "2022-11-13T15:15:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DonnEdwards](https://clarionhub.com/user_avatar/clarionhub.com/donnedwards/32/1047_2.png) [@DonnEdwards](https://clarionhub.com/u/DonnEdwards)\
**Post date:** [November 13, 2022, 3:15pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/1 "2022-11-13T15:15:38Z")

</div>

Hi all  
I am using BYTE fields to store True/False values in a table. The field name is “DefaultYN” and the values are set to True=1, False = 0  
I am happy with the CHECK control in the edit form, but I’m not so comfortable with a “1” display in the **browse form**. I have set the picture to “@N3B” so all the false values are blank.

How do I display this column with a “Y” or check mark if the value is True?

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [November 13, 2022, 3:22pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/2 "2022-11-13T15:22:01Z")

</div>

You can either go the icon way or just by text. Don’t put the actual byte field in the browse itself, but DO make it a hot field.

If you choose to go with an icon, set the appropriate icon number in SetQueueRecord.

Or you could use a local STRING, setting the value with either Carl’s WingDings pseudo icon idea, (which is neat if you’re not using Anyscreen) OR just set it to Y or N.

O

---

<div class="post-metadata">

**Author:** ![totalhip](https://clarionhub.com/user_avatar/clarionhub.com/totalhip/32/1477_2.png) [@totalhip](https://clarionhub.com/u/totalhip)\
**Post date:** [November 13, 2022, 3:22pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/3 "2022-11-13T15:22:15Z")

</div>

Add icon to browse col.  
Set col display to @p pB.  
Set icon display based on boolean value.

For Y value.  
Use local string variable in browse.  
Set table field as hot display.  
Set local string according to table field.

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [November 13, 2022, 3:24pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/4 "2022-11-13T15:24:18Z")

</div>

Define a local variable L:xxx String(3)

In the LIST Format add L:xxx as @s3 and remove the file field

In the embed Format Element for a Browse Queue set the string you want:

```auto
L:xxx = Choose(~Pre:DefaultYN,'No','Yup')

```

As Jeff said in Hot fields best to add Pre:DefaultYN

* * *

An alternative …

In the file instead of BYTE you can use STRING(1)

Then on the CHECK you add `VALUE('Y','N')` so checking stores Y/N not 1/0. So Browse and Report show Y/N with no extra code

That makes the code a bit uglier i.e. `IF Pre:DefaultYN = 'Y' THEN ...` and easier to get wrong than as BYTE

You also have to default the value to ‘N’ whereas a BYTE gets Zero by default.

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [November 13, 2022, 3:46pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/5 "2022-11-13T15:46:37Z")

</div>

> [@jslarve](#):
>
> Or you could use a local STRING, setting the value with either Carl’s WingDings pseudo icon idea,

Example with List Styles that shows List check boxes without icon files

> [@How to use Styles in a LIST - PROPLIST:Style - PROPSTYLE](https://clarionhub.com/t/how-to-use-styles-in-a-list-proplist-style-propstyle/3776):
>
> In Skype Leroy asked for examples of using LIST Style which would be FORMAT() codes Z(#) or Y. My CIDC 2019 presentation showed how to use STYLE to implement a Checkbox column or an Icon column. What makes this possible is using Style to change the Column or Cell to the WingDings font. I uploaded this to Git. IMO Style is a better way to implement LIST colors because it only takes one LONG so can result in much less generated code. Sorry I don’t have an example handy. If you have examples of u…

---

<div class="post-metadata">

**Author:** ![FedericoNavarro](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/2acd7d/32.png) [@FedericoNavarro](https://clarionhub.com/u/FedericoNavarro)\
**Post date:** [November 13, 2022, 3:55pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/6 "2022-11-13T15:55:23Z")

</div>

Donn, if you want Y when true and blank when false, you could use @n1~Y~B

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [November 13, 2022, 4:09pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/7 "2022-11-13T16:09:37Z")

</div>

Interesting. Never thought or heard of that one.

---

<div class="post-metadata">

**Author:** ![DonnEdwards](https://clarionhub.com/user_avatar/clarionhub.com/donnedwards/32/1047_2.png) [@DonnEdwards](https://clarionhub.com/u/DonnEdwards)\
**Post date:** [November 13, 2022, 4:21pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/8 "2022-11-13T16:21:40Z")

</div>

> [@CarlBarnes](#):
>
> In the embed Format Element for a Browse Queue set the string you want:
> 
> ```auto
> L:xxx = Choose(~Pre:DefaultYN,'No','Yup')
> 
> ```
> 
> As Jeff said in Hot fields best to add Pre:DefaultYN

I added loc:DefaultYN as a local variable, put it in the list, and added it to Hot fields. I just can’t figure out where the embed point is. I did a search for “format”, but found nothing that seemed to fit.

---

<div class="post-metadata">

**Author:** ![FedericoNavarro](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/2acd7d/32.png) [@FedericoNavarro](https://clarionhub.com/u/FedericoNavarro)\
**Post date:** [November 13, 2022, 4:21pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/9 "2022-11-13T16:21:54Z")

</div>

Yes, it is very handy. I often use it in this way @n1~\*~B ( asterisk instead of Y)

---

<div class="post-metadata">

**Author:** ![DonnEdwards](https://clarionhub.com/user_avatar/clarionhub.com/donnedwards/32/1047_2.png) [@DonnEdwards](https://clarionhub.com/u/DonnEdwards)\
**Post date:** [November 13, 2022, 4:26pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/10 "2022-11-13T16:26:27Z")

</div>

> [@FedericoNavarro](#):
>
> Y when true and blank when false, you could use @n1~Y~B

Works like a charm! Thank you.

I got the icon thing to work too, but didn’t like the result. Probably because I chose some rubbish icons.

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [November 13, 2022, 4:26pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/11 "2022-11-13T16:26:53Z")

</div>

YourBrowse.SetQueueRecord

---

<div class="post-metadata">

**Author:** ![DonnEdwards](https://clarionhub.com/user_avatar/clarionhub.com/donnedwards/32/1047_2.png) [@DonnEdwards](https://clarionhub.com/u/DonnEdwards)\
**Post date:** [November 13, 2022, 4:29pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/12 "2022-11-13T16:29:21Z")

</div>

I will watch the CIDC2019 presentation again. Thank you.

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [November 13, 2022, 4:59pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/13 "2022-11-13T16:59:42Z")

</div>

> [@DonnEdwards](#):
>
> I got the icon thing to work too, but didn’t like the result. Probably because I chose some rubbish icons.

There are check icons in C:\clarion#\images

SetQueueRecord is an embed you should know where you can adjust what shows in the browse

---

<div class="post-metadata">

**Author:** ![FedericoNavarro](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/2acd7d/32.png) [@FedericoNavarro](https://clarionhub.com/u/FedericoNavarro)\
**Post date:** [November 13, 2022, 6:03pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/14 "2022-11-13T18:03:31Z")

</div>

> [@FedericoNavarro](#):
>
> @n1~Y~B

To explain that, the ~ symbols surround the characters that are going to appear in the output, 1 is the total length of the output so there is no room for numbers nor the # signs when the number overflows the picture, it only shows the Y. And when it is zero, the B turns it into blank.

Example:

`MESSAGE('/' & FORMAT(0,@n1~Y~B) & '/' & FORMAT(1,@n1~Y~B) & '/' & FORMAT(1432,@n1~Y~B) & '/' )`

Shows:

/ /Y/Y/

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [November 13, 2022, 7:00pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/15 "2022-11-13T19:00:12Z")

</div>

@FedericoNavarro confirmed in a PM that `@n3~[X]~B` works too, producing `[X]` when non zero.

I see X or `[X]` fairly often for a check box. I find the asterisk looks small, in most fonts it is a superscript

---

<div class="post-metadata">

**Author:** ![seanh](https://clarionhub.com/letter_avatar_proxy/v4/letter/s/4af34b/32.png) [@seanh](https://clarionhub.com/u/seanh)\
**Post date:** [November 13, 2022, 9:45pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/16 "2022-11-13T21:45:37Z")

</div>

I tend to use STRING(1) with values of Y and N these days, which avoids this sort of thing in a browse.

---

<div class="post-metadata">

**Author:** ![BoxSoft](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/3d9bf3/32.png) [@BoxSoft](https://clarionhub.com/u/BoxSoft)\
**Post date:** [November 14, 2022, 2:56pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/17 "2022-11-14T14:56:20Z")

</div>

I was just about to post that picture trick myself. 👍

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [November 19, 2022, 7:38pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/18 "2022-11-19T19:38:51Z")

</div>

I’ll post the steps to show a graphic checkbox using a Style and Wingding like below instead of the original “Y”. I did bump the size from 8 to 9. It still looks pretty thin. One nice thing is these are fonts that scale to any size which icons do not do.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/0/0b5f70476ec8881b32909ba0d822eb73f15f0d53.png)

First you need to decide what Wingding to use. My Repo has a window with several Wingdings that work for Checkbox. The CHR(), Letter and Font are shown.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/5/5a76a5f9186cd9306c3366112d6c7d51dab9933d.png)

You need to define a Style under Actions like below where I entered the Font, Size as 10 and Style as Zero (meaning N/A, it defaults to 700 = Bold which you don’t want).  
Edit: Probably better to enter 400 for Regular. This should NOT require entering a value for Size or Style. I usually hand code these into the embed point.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/3/3a7fbfcddb6b1b5db5797b0e682be9cceacc20b3.png)

You can see in the List behind the Form this will be Style number 1, its not totally obvious. You MUST also select the “Run Time Listbox” tab, then select any lists you want to use this style for the List Style code to generate.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/5/58dae01f9e76e82cbd8e16d489a8344c16e78ba7.png)

If you look at the source you will find this style in the DefineListboxStyle ROUTINE (Legacy and ABC). You could skip using App Gen and type this style code in.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/b/bd3d47e988219aac3e93d83e7072d58423b1b8e2.png)

Open List Formatter and select the Checkbox column.  
Change the ‘Y’ in the picture to the Wingding character which is ‘R’ in this case: `@n1~R~b@ `.  
Change the Default Style enter type " 1 " or whatever style number was assigned.  
You will see this in the FORMAT string as `Z(1)`  
This style applies to every row in the column so they all are in Wingdings 2. They is also a Cell Style “Y” where you have a LONG in the Queue. You can have both, the Cell Style overrides the Column if its not zero.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/0/0320956f3d2b9e666ee3a80ca4a7a112d84f0b0c.png)

That’s it, build and run and it should look like the first screen capture.

* * *

A further enhancement would be to show an empty box when it is not checked. You cannot do that with a BYTE you must define a Loc:Active STRING(1) and put that in the List with a picture of @s1 plus the Default Style of 1.

In the embed “Format an Element of the Browse Queue (legacy)”, or SetQueueRecord (ABC), you need code like below to assigning the local Loc:Active based on the file value in MBR:Active. Char 163 is an empty check box, and ‘S’ is a different check box.

`Loc:Active=CHOOSE(~MBR:Active,'<163>','S')`

I modified the list to show this new box on the right of the above `@n1~R~b@ ` example:

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/d/d2e00cd5fc0c8e3b2e089829f0b9d7293ae3e225.png)

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [November 19, 2022, 7:48pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/19 "2022-11-19T19:48:36Z")

</div>

Hi Carl - Do you know whether the WingDings checkboxes work with AnyScreen on a non-windows client?

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [November 19, 2022, 10:28pm UTC](https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668/20 "2022-11-19T22:28:12Z")

</div>

> [@jslarve](#):
>
> Do you know whether the WingDings checkboxes work with AnyScreen

I [added AnyScreen](https://clarionhub.com/t/anyscreen-adding-to-a-100-hand-coded-project/5397) to my hand coded [List Styles example](https://github.com/CarlTBarnes/LIST-Style-Checkbox/tree/main/AnyScreen). The below shows AS HTML 5 on the Left does NOT work to show Wingdings 2 font, the normal ABCDEF show.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/7/7aa7f8fa0c788c056c44c9943d4a24a0b96a2820.png)

* * *

In the below capture the style does appear to change to Consolas font. The Window font is Segoe UI and the Consolas column “i” is obviously a fixed width `"i"` . So styles work but not Wingdings or Symbol?

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/a/aee4d157698dc27bba02e036ed68dde679065c20.png)

* * *

In the below window the Drop List shows Wingdings characters working when specified as a FONT() not as a Style. Maybe there is hope.

```auto
LIST,AT(169,28,34,12),USE(Check0),VSCROLL,FONT('Wingdings',14,COLOR:Red),DROP(15), |
        FROM('n|l|p|o|<0A8h>|<0A1h>|<0A2h>|<0FEh>|<0FDh>|<0A4h>|J|K|L')
 LIST,AT(208,28,34,12),USE(Check1),VSCROLL,FONT('Wingdings',14,COLOR:Green),DROP(15)

```

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/c/ca4984fce0d0e5fc649fa20e60f3b9094368e8a2.png)

* * *

It did work in the AS Windows Client, although sized smaller.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/f/f92b0f8cbd8f320f097a82f175596db69b57734b.png)
