Home > Archive > Clarion > August 2007 > How to add a calculated field/column to a browse box?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to add a calculated field/column to a browse box?
|
|
| mavenmind@gmail.com 2007-08-11, 6:55 pm |
| Hi
I'm embarrased to ask this, but here goes.
I am wanting to add a local data variable into a browse box, but
clearly I need to enter some data into that local variable for each
row of the browse. I cannot figure where to do this, or within which
embed point.
For example, lets say I have a FirstName data field and a Surname data
field. If I want to display the 2 fields concatenated (e.g. John
Smith) within a single column for this row, how woudl I do it?
Thanks
| |
|
| mavenmind@gmail.com wrote:
> Hi
>
> I'm embarrased to ask this, but here goes.
>
> I am wanting to add a local data variable into a browse box, but
> clearly I need to enter some data into that local variable for each
> row of the browse. I cannot figure where to do this, or within which
> embed point.
>
> For example, lets say I have a FirstName data field and a Surname data
> field. If I want to display the 2 fields concatenated (e.g. John
> Smith) within a single column for this row, how woudl I do it?
>
> Thanks
>
On setqueuerecord embeds of this browse, put code: clip(FirstName)&'
'&clip(Surname). Just be sure that column for this variables have enough
spaces for displaying...
| |
| Edward 2007-08-12, 3:55 am |
| You can also use a legacy embed.
First, set up your local variable. Insert the variable into your
browse as needed.
Next, go to the embeds for your browse.
Click on the red icon with the yellow foot at the top (Show Legacy
Embeds).
Under the embed "Browser, Format an element of the queue," put in
your code to set the local variable.
Example:
Loc:szDisplayName = prem:szFirstName & ' ' & prem:szSurname
This will set the value of the local variable for each element of the
queue.
HTH
On Aug 11, 2:37 pm, mavenm...@gmail.com wrote:
> Hi
>
> I'm embarrased to ask this, but here goes.
>
> I am wanting to add a local data variable into a browse box, but
> clearly I need to enter some data into that local variable for each
> row of the browse. I cannot figure where to do this, or within which
> embed point.
>
> For example, lets say I have a FirstName data field and a Surname data
> field. If I want to display the 2 fields concatenated (e.g. John
> Smith) within a single column for this row, how woudl I do it?
>
> Thanks
| |
| mavenmind@gmail.com 2007-08-12, 7:55 am |
| Many thanks to both of you. I'll have a look. The coding is straight
forward, I was just battling to find a suitable embed point. I'll try
it and see how it goes. I don't recall seeing the SetQueueRecord
embed, but I'll look again, other wise, I'll try the legacy embed
point.
Thanks
Mavenmind
|
|
|
|
|