FMPexperts Archive

List Statistics

  • Total Threads: 1912
  • Total Posts: 3703

Phrases Used to Find This Thread

  #1  
28-06-2012 01:13 AM
FMPexperts member admin is online now
User
 

Hi Experts:

I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.

In other words, I want to place just the first letter from each box checked
in one field into another field.

Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C

If I select checkbox A and C, I want the following to appear in another
field

A, C

Any help would be very much appreciated.

Thank You

Mary


_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)

  #2  
28-06-2012 01:32 AM
FMPexperts member admin is online now
User
 

Hi Experts:

I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.

In other words, I want to place just the first letter from each box checked
in one field into another field.

Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C

If I select checkbox A and C, I want the following to appear in another
field

A, C

Any help would be very much appreciated.

Thank You

Mary


_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.

There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C

Malcolm



On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:

> Hi Experts:
>
> I have a checkbox field wherein the user can check several boxes. I want to
> be able to grab just the first letter from each selected checkbox and place
> that first letter with a comma separating each selection in another field.
> I don't want to use the list function because I want each letter separated
> by a comma on the same line.
>
> In other words, I want to place just the first letter from each box checked
> in one field into another field.
>
> Checkbox: A-The letter A
> Checkbox: B-The letter B
> Checkbox: C-The letter C
>
> If I select checkbox A and C, I want the following to appear in another
> field
>
> A, C
>
> Any help would be very much appreciated.
>
> Thank You
>
> Mary
>
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)

  #3  
28-06-2012 01:53 AM
FMPexperts member admin is online now
User
 

Hi Experts:

I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.

In other words, I want to place just the first letter from each box checked
in one field into another field.

Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C

If I select checkbox A and C, I want the following to appear in another
field

A, C

Any help would be very much appreciated.

Thank You

Mary


_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.

There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C

Malcolm



On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:

> Hi Experts:
>
> I have a checkbox field wherein the user can check several boxes. I want to
> be able to grab just the first letter from each selected checkbox and place
> that first letter with a comma separating each selection in another field.
> I don't want to use the list function because I want each letter separated
> by a comma on the same line.
>
> In other words, I want to place just the first letter from each box checked
> in one field into another field.
>
> Checkbox: A-The letter A
> Checkbox: B-The letter B
> Checkbox: C-The letter C
>
> If I select checkbox A and C, I want the following to appear in another
> field
>
> A, C
>
> Any help would be very much appreciated.
>
> Thank You
>
> Mary
>
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.

Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.

I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.


On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:

> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>
> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>
> Malcolm
>
>
>
> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>
>> Hi Experts:
>>
>> I have a checkbox field wherein the user can check several boxes. I want to
>> be able to grab just the first letter from each selected checkbox and place
>> that first letter with a comma separating each selection in another field.
>> I don't want to use the list function because I want each letter separated
>> by a comma on the same line.
>>
>> In other words, I want to place just the first letter from each box checked
>> in one field into another field.
>>
>> Checkbox: A-The letter A
>> Checkbox: B-The letter B
>> Checkbox: C-The letter C
>>
>> If I select checkbox A and C, I want the following to appear in another
>> field
>>
>> A, C
>>
>> Any help would be very much appreciated.
>>
>> Thank You
>>
>> Mary
>>
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


Derrick

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)

  #4  
28-06-2012 02:12 AM
FMPexperts member admin is online now
User
 

Hi Experts:

I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.

In other words, I want to place just the first letter from each box checked
in one field into another field.

Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C

If I select checkbox A and C, I want the following to appear in another
field

A, C

Any help would be very much appreciated.

Thank You

Mary


_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.

There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C

Malcolm



On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:

> Hi Experts:
>
> I have a checkbox field wherein the user can check several boxes. I want to
> be able to grab just the first letter from each selected checkbox and place
> that first letter with a comma separating each selection in another field.
> I don't want to use the list function because I want each letter separated
> by a comma on the same line.
>
> In other words, I want to place just the first letter from each box checked
> in one field into another field.
>
> Checkbox: A-The letter A
> Checkbox: B-The letter B
> Checkbox: C-The letter C
>
> If I select checkbox A and C, I want the following to appear in another
> field
>
> A, C
>
> Any help would be very much appreciated.
>
> Thank You
>
> Mary
>
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.

Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.

I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.


On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:

> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>
> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>
> Malcolm
>
>
>
> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>
>> Hi Experts:
>>
>> I have a checkbox field wherein the user can check several boxes. I want to
>> be able to grab just the first letter from each selected checkbox and place
>> that first letter with a comma separating each selection in another field.
>> I don't want to use the list function because I want each letter separated
>> by a comma on the same line.
>>
>> In other words, I want to place just the first letter from each box checked
>> in one field into another field.
>>
>> Checkbox: A-The letter A
>> Checkbox: B-The letter B
>> Checkbox: C-The letter C
>>
>> If I select checkbox A and C, I want the following to appear in another
>> field
>>
>> A, C
>>
>> Any help would be very much appreciated.
>>
>> Thank You
>>
>> Mary
>>
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


Derrick

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
The complexity goes away if you allow two rules:

1. always append a delimiter
2. always trim the final delimiter


Malcolm


On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:

> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>
> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>
> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>
>
> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>
>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>
>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>
>> Malcolm
>>
>>
>>
>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>
>>> Hi Experts:
>>>
>>> I have a checkbox field wherein the user can check several boxes. I want to
>>> be able to grab just the first letter from each selected checkbox and place
>>> that first letter with a comma separating each selection in another field.
>>> I don't want to use the list function because I want each letter separated
>>> by a comma on the same line.
>>>
>>> In other words, I want to place just the first letter from each box checked
>>> in one field into another field.
>>>
>>> Checkbox: A-The letter A
>>> Checkbox: B-The letter B
>>> Checkbox: C-The letter C
>>>
>>> If I select checkbox A and C, I want the following to appear in another
>>> field
>>>
>>> A, C
>>>
>>> Any help would be very much appreciated.
>>>
>>> Thank You
>>>
>>> Mary
>>>
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
>
> Derrick
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)

  #5  
28-06-2012 02:20 AM
FMPexperts member admin is online now
User
 

Hi Experts:

I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.

In other words, I want to place just the first letter from each box checked
in one field into another field.

Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C

If I select checkbox A and C, I want the following to appear in another
field

A, C

Any help would be very much appreciated.

Thank You

Mary


_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.

There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C

Malcolm



On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:

> Hi Experts:
>
> I have a checkbox field wherein the user can check several boxes. I want to
> be able to grab just the first letter from each selected checkbox and place
> that first letter with a comma separating each selection in another field.
> I don't want to use the list function because I want each letter separated
> by a comma on the same line.
>
> In other words, I want to place just the first letter from each box checked
> in one field into another field.
>
> Checkbox: A-The letter A
> Checkbox: B-The letter B
> Checkbox: C-The letter C
>
> If I select checkbox A and C, I want the following to appear in another
> field
>
> A, C
>
> Any help would be very much appreciated.
>
> Thank You
>
> Mary
>
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.

Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.

I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.


On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:

> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>
> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>
> Malcolm
>
>
>
> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>
>> Hi Experts:
>>
>> I have a checkbox field wherein the user can check several boxes. I want to
>> be able to grab just the first letter from each selected checkbox and place
>> that first letter with a comma separating each selection in another field.
>> I don't want to use the list function because I want each letter separated
>> by a comma on the same line.
>>
>> In other words, I want to place just the first letter from each box checked
>> in one field into another field.
>>
>> Checkbox: A-The letter A
>> Checkbox: B-The letter B
>> Checkbox: C-The letter C
>>
>> If I select checkbox A and C, I want the following to appear in another
>> field
>>
>> A, C
>>
>> Any help would be very much appreciated.
>>
>> Thank You
>>
>> Mary
>>
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


Derrick

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
The complexity goes away if you allow two rules:

1. always append a delimiter
2. always trim the final delimiter


Malcolm


On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:

> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>
> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>
> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>
>
> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>
>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>
>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>
>> Malcolm
>>
>>
>>
>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>
>>> Hi Experts:
>>>
>>> I have a checkbox field wherein the user can check several boxes. I want to
>>> be able to grab just the first letter from each selected checkbox and place
>>> that first letter with a comma separating each selection in another field.
>>> I don't want to use the list function because I want each letter separated
>>> by a comma on the same line.
>>>
>>> In other words, I want to place just the first letter from each box checked
>>> in one field into another field.
>>>
>>> Checkbox: A-The letter A
>>> Checkbox: B-The letter B
>>> Checkbox: C-The letter C
>>>
>>> If I select checkbox A and C, I want the following to appear in another
>>> field
>>>
>>> A, C
>>>
>>> Any help would be very much appreciated.
>>>
>>> Thank You
>>>
>>> Mary
>>>
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
>
> Derrick
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
Mary,
A checkbox input save a the options selected in a return-delimited list, in
the order the user checked them. So if you don't care what order your
letters are in, then you can create a calc to produce a comma-delimited list
of the first character of each option selected.

Let([
A = Left( GetValue( ; 1); 1 );
B = Left( GetValue( ; 2); 1 );
C = Left( GetValue( ; 3); 1 );
Spaces = trim( A & " " & B & " " & C )
];
Substitute( Line; " "; ", " )
)

You would, of course, continue the A-B-C thing for the maximum numbers of
options that the user can select. So if the user can select up to 10
options, then you'd need to continue on up to "J"
--
Richard DeShong, Systems Analyst
Athletic Study Center, U.C. Berkeley
LogicTools



-----Original Message-----
From: Mary Barrett-Sparrow Sent: Wednesday, June 27, 2012 5:14 PM

Hi Experts:
I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.
In other words, I want to place just the first letter from each box checked
in one field into another field.
Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C
If I select checkbox A and C, I want the following to appear in another
field
A, C
Any help would be very much appreciated.
Thank You
Mary

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)

  #6  
28-06-2012 02:25 AM
FMPexperts member admin is online now
User
 

Hi Experts:

I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.

In other words, I want to place just the first letter from each box checked
in one field into another field.

Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C

If I select checkbox A and C, I want the following to appear in another
field

A, C

Any help would be very much appreciated.

Thank You

Mary


_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.

There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C

Malcolm



On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:

> Hi Experts:
>
> I have a checkbox field wherein the user can check several boxes. I want to
> be able to grab just the first letter from each selected checkbox and place
> that first letter with a comma separating each selection in another field.
> I don't want to use the list function because I want each letter separated
> by a comma on the same line.
>
> In other words, I want to place just the first letter from each box checked
> in one field into another field.
>
> Checkbox: A-The letter A
> Checkbox: B-The letter B
> Checkbox: C-The letter C
>
> If I select checkbox A and C, I want the following to appear in another
> field
>
> A, C
>
> Any help would be very much appreciated.
>
> Thank You
>
> Mary
>
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.

Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.

I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.


On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:

> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>
> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>
> Malcolm
>
>
>
> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>
>> Hi Experts:
>>
>> I have a checkbox field wherein the user can check several boxes. I want to
>> be able to grab just the first letter from each selected checkbox and place
>> that first letter with a comma separating each selection in another field.
>> I don't want to use the list function because I want each letter separated
>> by a comma on the same line.
>>
>> In other words, I want to place just the first letter from each box checked
>> in one field into another field.
>>
>> Checkbox: A-The letter A
>> Checkbox: B-The letter B
>> Checkbox: C-The letter C
>>
>> If I select checkbox A and C, I want the following to appear in another
>> field
>>
>> A, C
>>
>> Any help would be very much appreciated.
>>
>> Thank You
>>
>> Mary
>>
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


Derrick

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
The complexity goes away if you allow two rules:

1. always append a delimiter
2. always trim the final delimiter


Malcolm


On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:

> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>
> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>
> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>
>
> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>
>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>
>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>
>> Malcolm
>>
>>
>>
>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>
>>> Hi Experts:
>>>
>>> I have a checkbox field wherein the user can check several boxes. I want to
>>> be able to grab just the first letter from each selected checkbox and place
>>> that first letter with a comma separating each selection in another field.
>>> I don't want to use the list function because I want each letter separated
>>> by a comma on the same line.
>>>
>>> In other words, I want to place just the first letter from each box checked
>>> in one field into another field.
>>>
>>> Checkbox: A-The letter A
>>> Checkbox: B-The letter B
>>> Checkbox: C-The letter C
>>>
>>> If I select checkbox A and C, I want the following to appear in another
>>> field
>>>
>>> A, C
>>>
>>> Any help would be very much appreciated.
>>>
>>> Thank You
>>>
>>> Mary
>>>
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
>
> Derrick
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
Mary,
A checkbox input save a the options selected in a return-delimited list, in
the order the user checked them. So if you don't care what order your
letters are in, then you can create a calc to produce a comma-delimited list
of the first character of each option selected.

Let([
A = Left( GetValue( ; 1); 1 );
B = Left( GetValue( ; 2); 1 );
C = Left( GetValue( ; 3); 1 );
Spaces = trim( A & " " & B & " " & C )
];
Substitute( Line; " "; ", " )
)

You would, of course, continue the A-B-C thing for the maximum numbers of
options that the user can select. So if the user can select up to 10
options, then you'd need to continue on up to "J"
--
Richard DeShong, Systems Analyst
Athletic Study Center, U.C. Berkeley
LogicTools



-----Original Message-----
From: Mary Barrett-Sparrow Sent: Wednesday, June 27, 2012 5:14 PM

Hi Experts:
I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.
In other words, I want to place just the first letter from each box checked
in one field into another field.
Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C
If I select checkbox A and C, I want the following to appear in another
field
A, C
Any help would be very much appreciated.
Thank You
Mary

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
I would:

1. Use Agnes Barouh's wonderful CustomList ( ) custom function to step through the values with GetValue ( ) (1 through ValueCount ( ) and grab the first letter and return a list of first letters. [1]

2. Use a "bubble sort" CF to alphabetize them. [2]

3. Substitute ( ) the carriage returns in the sorted list with commas and violá!

[1] http://www.briandunning.com/cf/868
[2] http://www.briandunning.com/cf/26

HTH

j.


On Jun 27, 2012, at 9:12 PM, Malcolm Fitzgerald wrote:

> The complexity goes away if you allow two rules:
>
> 1. always append a delimiter
> 2. always trim the final delimiter
>
>
> Malcolm
>
>
> On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:
>
>> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>>
>> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>>
>> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>>
>>
>> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>>
>>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>>
>>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>>
>>> Malcolm
>>>
>>>
>>>
>>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>>
>>>> Hi Experts:
>>>>
>>>> I have a checkbox field wherein the user can check several boxes. I want to
>>>> be able to grab just the first letter from each selected checkbox and place
>>>> that first letter with a comma separating each selection in another field.
>>>> I don't want to use the list function because I want each letter separated
>>>> by a comma on the same line.
>>>>
>>>> In other words, I want to place just the first letter from each box checked
>>>> in one field into another field.
>>>>
>>>> Checkbox: A-The letter A
>>>> Checkbox: B-The letter B
>>>> Checkbox: C-The letter C
>>>>
>>>> If I select checkbox A and C, I want the following to appear in another
>>>> field
>>>>
>>>> A, C
>>>>
>>>> Any help would be very much appreciated.
>>>>
>>>> Thank You
>>>>
>>>> Mary
>>>>
>>>>
>>>> _______________________________________________
>>>> FMPexperts mailing list
>>>>
>>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>>
>> Derrick
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


--
Jonathan Fletcher
FileMaker 9/10/11 Certified Developer

Fletcher Data Consulting

http://www.fletcherdata.com
502-509-7137

Personal Blog o'Stuff: http://jfletch.posterous.com

Kentuckiana's FileMaker Users Group
Next up: Albert Harum-Alvarez FileMaker Design "Slug-fest!"
Tuesday, July 24, 12:00 pm to 3:30-ish
Blog: http://www.kyfmp.com



_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)

  #7  
28-06-2012 02:50 AM
FMPexperts member admin is online now
User
 

Hi Experts:

I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.

In other words, I want to place just the first letter from each box checked
in one field into another field.

Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C

If I select checkbox A and C, I want the following to appear in another
field

A, C

Any help would be very much appreciated.

Thank You

Mary


_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.

There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C

Malcolm



On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:

> Hi Experts:
>
> I have a checkbox field wherein the user can check several boxes. I want to
> be able to grab just the first letter from each selected checkbox and place
> that first letter with a comma separating each selection in another field.
> I don't want to use the list function because I want each letter separated
> by a comma on the same line.
>
> In other words, I want to place just the first letter from each box checked
> in one field into another field.
>
> Checkbox: A-The letter A
> Checkbox: B-The letter B
> Checkbox: C-The letter C
>
> If I select checkbox A and C, I want the following to appear in another
> field
>
> A, C
>
> Any help would be very much appreciated.
>
> Thank You
>
> Mary
>
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.

Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.

I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.


On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:

> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>
> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>
> Malcolm
>
>
>
> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>
>> Hi Experts:
>>
>> I have a checkbox field wherein the user can check several boxes. I want to
>> be able to grab just the first letter from each selected checkbox and place
>> that first letter with a comma separating each selection in another field.
>> I don't want to use the list function because I want each letter separated
>> by a comma on the same line.
>>
>> In other words, I want to place just the first letter from each box checked
>> in one field into another field.
>>
>> Checkbox: A-The letter A
>> Checkbox: B-The letter B
>> Checkbox: C-The letter C
>>
>> If I select checkbox A and C, I want the following to appear in another
>> field
>>
>> A, C
>>
>> Any help would be very much appreciated.
>>
>> Thank You
>>
>> Mary
>>
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


Derrick

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
The complexity goes away if you allow two rules:

1. always append a delimiter
2. always trim the final delimiter


Malcolm


On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:

> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>
> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>
> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>
>
> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>
>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>
>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>
>> Malcolm
>>
>>
>>
>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>
>>> Hi Experts:
>>>
>>> I have a checkbox field wherein the user can check several boxes. I want to
>>> be able to grab just the first letter from each selected checkbox and place
>>> that first letter with a comma separating each selection in another field.
>>> I don't want to use the list function because I want each letter separated
>>> by a comma on the same line.
>>>
>>> In other words, I want to place just the first letter from each box checked
>>> in one field into another field.
>>>
>>> Checkbox: A-The letter A
>>> Checkbox: B-The letter B
>>> Checkbox: C-The letter C
>>>
>>> If I select checkbox A and C, I want the following to appear in another
>>> field
>>>
>>> A, C
>>>
>>> Any help would be very much appreciated.
>>>
>>> Thank You
>>>
>>> Mary
>>>
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
>
> Derrick
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
Mary,
A checkbox input save a the options selected in a return-delimited list, in
the order the user checked them. So if you don't care what order your
letters are in, then you can create a calc to produce a comma-delimited list
of the first character of each option selected.

Let([
A = Left( GetValue( ; 1); 1 );
B = Left( GetValue( ; 2); 1 );
C = Left( GetValue( ; 3); 1 );
Spaces = trim( A & " " & B & " " & C )
];
Substitute( Line; " "; ", " )
)

You would, of course, continue the A-B-C thing for the maximum numbers of
options that the user can select. So if the user can select up to 10
options, then you'd need to continue on up to "J"
--
Richard DeShong, Systems Analyst
Athletic Study Center, U.C. Berkeley
LogicTools



-----Original Message-----
From: Mary Barrett-Sparrow Sent: Wednesday, June 27, 2012 5:14 PM

Hi Experts:
I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.
In other words, I want to place just the first letter from each box checked
in one field into another field.
Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C
If I select checkbox A and C, I want the following to appear in another
field
A, C
Any help would be very much appreciated.
Thank You
Mary

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
I would:

1. Use Agnes Barouh's wonderful CustomList ( ) custom function to step through the values with GetValue ( ) (1 through ValueCount ( ) and grab the first letter and return a list of first letters. [1]

2. Use a "bubble sort" CF to alphabetize them. [2]

3. Substitute ( ) the carriage returns in the sorted list with commas and violá!

[1] http://www.briandunning.com/cf/868
[2] http://www.briandunning.com/cf/26

HTH

j.


On Jun 27, 2012, at 9:12 PM, Malcolm Fitzgerald wrote:

> The complexity goes away if you allow two rules:
>
> 1. always append a delimiter
> 2. always trim the final delimiter
>
>
> Malcolm
>
>
> On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:
>
>> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>>
>> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>>
>> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>>
>>
>> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>>
>>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>>
>>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>>
>>> Malcolm
>>>
>>>
>>>
>>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>>
>>>> Hi Experts:
>>>>
>>>> I have a checkbox field wherein the user can check several boxes. I want to
>>>> be able to grab just the first letter from each selected checkbox and place
>>>> that first letter with a comma separating each selection in another field.
>>>> I don't want to use the list function because I want each letter separated
>>>> by a comma on the same line.
>>>>
>>>> In other words, I want to place just the first letter from each box checked
>>>> in one field into another field.
>>>>
>>>> Checkbox: A-The letter A
>>>> Checkbox: B-The letter B
>>>> Checkbox: C-The letter C
>>>>
>>>> If I select checkbox A and C, I want the following to appear in another
>>>> field
>>>>
>>>> A, C
>>>>
>>>> Any help would be very much appreciated.
>>>>
>>>> Thank You
>>>>
>>>> Mary
>>>>
>>>>
>>>> _______________________________________________
>>>> FMPexperts mailing list
>>>>
>>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>>
>> Derrick
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


--
Jonathan Fletcher
FileMaker 9/10/11 Certified Developer

Fletcher Data Consulting

http://www.fletcherdata.com
502-509-7137

Personal Blog o'Stuff: http://jfletch.posterous.com

Kentuckiana's FileMaker Users Group
Next up: Albert Harum-Alvarez FileMaker Design "Slug-fest!"
Tuesday, July 24, 12:00 pm to 3:30-ish
Blog: http://www.kyfmp.com



_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
+1 Malcolm's right. Simple, easy, straightforward.


On Jun 27, 2012, at 8:12 PM, Malcolm Fitzgerald wrote:

> The complexity goes away if you allow two rules:
>
> 1. always append a delimiter
> 2. always trim the final delimiter
>
>
> Malcolm
>
>
> On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:
>
>> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>>
>> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>>
>> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>>
>>
>> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>>
>>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>>
>>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>>
>>> Malcolm
>>>
>>>
>>>
>>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>>
>>>> Hi Experts:
>>>>
>>>> I have a checkbox field wherein the user can check several boxes. I want to
>>>> be able to grab just the first letter from each selected checkbox and place
>>>> that first letter with a comma separating each selection in another field.
>>>> I don't want to use the list function because I want each letter separated
>>>> by a comma on the same line.
>>>>
>>>> In other words, I want to place just the first letter from each box checked
>>>> in one field into another field.
>>>>
>>>> Checkbox: A-The letter A
>>>> Checkbox: B-The letter B
>>>> Checkbox: C-The letter C
>>>>
>>>> If I select checkbox A and C, I want the following to appear in another
>>>> field
>>>>
>>>> A, C
>>>>
>>>> Any help would be very much appreciated.
>>>>
>>>> Thank You
>>>>
>>>> Mary
>>>>
>>>>
>>>> _______________________________________________
>>>> FMPexperts mailing list
>>>>
>>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>>
>> Derrick
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


Derrick

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)

  #8  
28-06-2012 04:53 AM
FMPexperts member admin is online now
User
 

Hi Experts:

I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.

In other words, I want to place just the first letter from each box checked
in one field into another field.

Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C

If I select checkbox A and C, I want the following to appear in another
field

A, C

Any help would be very much appreciated.

Thank You

Mary


_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.

There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C

Malcolm



On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:

> Hi Experts:
>
> I have a checkbox field wherein the user can check several boxes. I want to
> be able to grab just the first letter from each selected checkbox and place
> that first letter with a comma separating each selection in another field.
> I don't want to use the list function because I want each letter separated
> by a comma on the same line.
>
> In other words, I want to place just the first letter from each box checked
> in one field into another field.
>
> Checkbox: A-The letter A
> Checkbox: B-The letter B
> Checkbox: C-The letter C
>
> If I select checkbox A and C, I want the following to appear in another
> field
>
> A, C
>
> Any help would be very much appreciated.
>
> Thank You
>
> Mary
>
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.

Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.

I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.


On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:

> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>
> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>
> Malcolm
>
>
>
> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>
>> Hi Experts:
>>
>> I have a checkbox field wherein the user can check several boxes. I want to
>> be able to grab just the first letter from each selected checkbox and place
>> that first letter with a comma separating each selection in another field.
>> I don't want to use the list function because I want each letter separated
>> by a comma on the same line.
>>
>> In other words, I want to place just the first letter from each box checked
>> in one field into another field.
>>
>> Checkbox: A-The letter A
>> Checkbox: B-The letter B
>> Checkbox: C-The letter C
>>
>> If I select checkbox A and C, I want the following to appear in another
>> field
>>
>> A, C
>>
>> Any help would be very much appreciated.
>>
>> Thank You
>>
>> Mary
>>
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


Derrick

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
The complexity goes away if you allow two rules:

1. always append a delimiter
2. always trim the final delimiter


Malcolm


On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:

> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>
> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>
> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>
>
> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>
>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>
>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>
>> Malcolm
>>
>>
>>
>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>
>>> Hi Experts:
>>>
>>> I have a checkbox field wherein the user can check several boxes. I want to
>>> be able to grab just the first letter from each selected checkbox and place
>>> that first letter with a comma separating each selection in another field.
>>> I don't want to use the list function because I want each letter separated
>>> by a comma on the same line.
>>>
>>> In other words, I want to place just the first letter from each box checked
>>> in one field into another field.
>>>
>>> Checkbox: A-The letter A
>>> Checkbox: B-The letter B
>>> Checkbox: C-The letter C
>>>
>>> If I select checkbox A and C, I want the following to appear in another
>>> field
>>>
>>> A, C
>>>
>>> Any help would be very much appreciated.
>>>
>>> Thank You
>>>
>>> Mary
>>>
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
>
> Derrick
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
Mary,
A checkbox input save a the options selected in a return-delimited list, in
the order the user checked them. So if you don't care what order your
letters are in, then you can create a calc to produce a comma-delimited list
of the first character of each option selected.

Let([
A = Left( GetValue( ; 1); 1 );
B = Left( GetValue( ; 2); 1 );
C = Left( GetValue( ; 3); 1 );
Spaces = trim( A & " " & B & " " & C )
];
Substitute( Line; " "; ", " )
)

You would, of course, continue the A-B-C thing for the maximum numbers of
options that the user can select. So if the user can select up to 10
options, then you'd need to continue on up to "J"
--
Richard DeShong, Systems Analyst
Athletic Study Center, U.C. Berkeley
LogicTools



-----Original Message-----
From: Mary Barrett-Sparrow Sent: Wednesday, June 27, 2012 5:14 PM

Hi Experts:
I have a checkbox field wherein the user can check several boxes. I want to
be able to grab just the first letter from each selected checkbox and place
that first letter with a comma separating each selection in another field.
I don't want to use the list function because I want each letter separated
by a comma on the same line.
In other words, I want to place just the first letter from each box checked
in one field into another field.
Checkbox: A-The letter A
Checkbox: B-The letter B
Checkbox: C-The letter C
If I select checkbox A and C, I want the following to appear in another
field
A, C
Any help would be very much appreciated.
Thank You
Mary

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
I would:

1. Use Agnes Barouh's wonderful CustomList ( ) custom function to step through the values with GetValue ( ) (1 through ValueCount ( ) and grab the first letter and return a list of first letters. [1]

2. Use a "bubble sort" CF to alphabetize them. [2]

3. Substitute ( ) the carriage returns in the sorted list with commas and violá!

[1] http://www.briandunning.com/cf/868
[2] http://www.briandunning.com/cf/26

HTH

j.


On Jun 27, 2012, at 9:12 PM, Malcolm Fitzgerald wrote:

> The complexity goes away if you allow two rules:
>
> 1. always append a delimiter
> 2. always trim the final delimiter
>
>
> Malcolm
>
>
> On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:
>
>> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>>
>> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>>
>> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>>
>>
>> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>>
>>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>>
>>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>>
>>> Malcolm
>>>
>>>
>>>
>>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>>
>>>> Hi Experts:
>>>>
>>>> I have a checkbox field wherein the user can check several boxes. I want to
>>>> be able to grab just the first letter from each selected checkbox and place
>>>> that first letter with a comma separating each selection in another field.
>>>> I don't want to use the list function because I want each letter separated
>>>> by a comma on the same line.
>>>>
>>>> In other words, I want to place just the first letter from each box checked
>>>> in one field into another field.
>>>>
>>>> Checkbox: A-The letter A
>>>> Checkbox: B-The letter B
>>>> Checkbox: C-The letter C
>>>>
>>>> If I select checkbox A and C, I want the following to appear in another
>>>> field
>>>>
>>>> A, C
>>>>
>>>> Any help would be very much appreciated.
>>>>
>>>> Thank You
>>>>
>>>> Mary
>>>>
>>>>
>>>> _______________________________________________
>>>> FMPexperts mailing list
>>>>
>>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>>
>> Derrick
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


--
Jonathan Fletcher
FileMaker 9/10/11 Certified Developer

Fletcher Data Consulting

http://www.fletcherdata.com
502-509-7137

Personal Blog o'Stuff: http://jfletch.posterous.com

Kentuckiana's FileMaker Users Group
Next up: Albert Harum-Alvarez FileMaker Design "Slug-fest!"
Tuesday, July 24, 12:00 pm to 3:30-ish
Blog: http://www.kyfmp.com



_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
+1 Malcolm's right. Simple, easy, straightforward.


On Jun 27, 2012, at 8:12 PM, Malcolm Fitzgerald wrote:

> The complexity goes away if you allow two rules:
>
> 1. always append a delimiter
> 2. always trim the final delimiter
>
>
> Malcolm
>
>
> On 28/06/2012, at 10:53 AM, Derrick Fogle wrote:
>
>> This is actually a kind of interesting problem, because a rote calculation field would have to check for existence of any prior, and current, checkbox, to insert the delimiter or not. Without being able to start filling a variable, and just checking for not empty plus the next character for the delimiter, the "any prior" part starts getting really clunky, really fast.
>>
>> Scripts provide the modular variable test approach, and these days triggers are reasonably reliable and predictable. But triggers, plus scripts, in two different development windows is still, IMHO, clunky from a development and maintenance perspective.
>>
>> I would expect a custom function to knock this one out of the ballpark. Sorry I don't have one ready.
>>
>>
>> On Jun 27, 2012, at 7:32 PM, Malcolm Fitzgerald wrote:
>>
>>> At first glance the problem is easy but whenever you have to iterate on a list you need to loop through the items using a script or a custom function. A custom function can be placed into a field's calc, which is handy. A script could be attached to the original field's "onModify" or "onExit" trigger and used to put data into a new field.
>>>
>>> There is a hidden problem: if a user selects option C before option A you'll end up with C,A not A,C
>>>
>>> Malcolm
>>>
>>>
>>>
>>> On 28/06/2012, at 10:13 AM, Mary Barrett-Sparrow wrote:
>>>
>>>> Hi Experts:
>>>>
>>>> I have a checkbox field wherein the user can check several boxes. I want to
>>>> be able to grab just the first letter from each selected checkbox and place
>>>> that first letter with a comma separating each selection in another field.
>>>> I don't want to use the list function because I want each letter separated
>>>> by a comma on the same line.
>>>>
>>>> In other words, I want to place just the first letter from each box checked
>>>> in one field into another field.
>>>>
>>>> Checkbox: A-The letter A
>>>> Checkbox: B-The letter B
>>>> Checkbox: C-The letter C
>>>>
>>>> If I select checkbox A and C, I want the following to appear in another
>>>> field
>>>>
>>>> A, C
>>>>
>>>> Any help would be very much appreciated.
>>>>
>>>> Thank You
>>>>
>>>> Mary
>>>>
>>>>
>>>> _______________________________________________
>>>> FMPexperts mailing list
>>>>
>>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>>
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>>
>> Derrick
>>
>> _______________________________________________
>> FMPexperts mailing list
>>
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au


Derrick

_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)
Wow. Thanks everyone. You have been, as usual more than helpful.

Mary Barrett-Sparrow

On Jun 27, 2012, at 5:13 PM, Mary Barrett-Sparrow <> wrote:

> Hi Experts:
>
> I have a checkbox field wherein the user can check several boxes. I want to
> be able to grab just the first letter from each selected checkbox and place
> that first letter with a comma separating each selection in another field.
> I don't want to use the list function because I want each letter separated
> by a comma on the same line.
>
> In other words, I want to place just the first letter from each box checked
> in one field into another field.
>
> Checkbox: A-The letter A
> Checkbox: B-The letter B
> Checkbox: C-The letter C
>
> If I select checkbox A and C, I want the following to appear in another
> field
>
> A, C
>
> Any help would be very much appreciated.
>
> Thank You
>
> Mary
>
>
> _______________________________________________
> FMPexperts mailing list
>
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
_______________________________________________
FMPexperts mailing list

http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
)





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: