Help choosing a field from a script

I am creating a database where I need the user to be able to choose to
process specified formatting on a field of their choice within the
database.

So for example, if the database contains State, City and ZIP, I want
the user to be able to choose from a script to do a "Title Case"
change on any of the above 3 fields.

How can I create a script that will allow the user to select any one
of the above 3 fields to perform the text format processing on ?

-S
squeed2000 [ Sa, 21 Juli 2007 16:19 ] [ ID #1774853 ]

Re: Help choosing a field from a script

<squeed2000 [at] yahoo.com> schreef in bericht
news:1185027559.592936.125380 [at] k79g2000hse.googlegroups.com.. .
>I am creating a database where I need the user to be able to choose to
> process specified formatting on a field of their choice within the
> database.
>
> So for example, if the database contains State, City and ZIP, I want
> the user to be able to choose from a script to do a "Title Case"
> change on any of the above 3 fields.
>
> How can I create a script that will allow the user to select any one
> of the above 3 fields to perform the text format processing on ?
>
> -S
>

Create a value list with the field names
Create a global text field, <Choices>
Create a new layout, make it look like a small window
Put the global on the layout, make the field with check-boxes
Put on the layout a button that continues the script
On you main layout make a button <change case>
Create a script that goes to the new layout. Halt the script. Let the user
decide what fields to change
Let him then hit the button that continues the script
Go back to original layout
Then change the cases of the fields the user has specified.


You should also let the user be able to chance the case of the current field

Keep well, Ursus
ursus.kirk [ Sa, 21 Juli 2007 16:52 ] [ ID #1774854 ]

Re: Help choosing a field from a script

In article
<1185027559.592936.125380 [at] k79g2000hse.googlegroups.com>squeed2000 [at] yahoo
com wrote:
> I am creating a database where I need the user to be able to choose
> toprocess specified formatting on a field of their choice within the
> database.

> So for example, if the database contains State, City and ZIP, I want
> the user to be able to choose from a script to do a "Title
> Case"change on any of the above 3 fields.

> How can I create a script that will allow the user to select any
> oneof the above 3 fields to perform the text format processing on ?

> -S

Wondering why you would leave it up to the user to deal with it?

Is there a specific reason you wouldn't just set the fields to
auto-enter the required change?

Matt

--
Free FileMaker Technique Demos: http://www.VirtualVermont.com/FMP

My Custom Functions: http://www.briandunning.com/filemaker-custom-functions/resul ts.php?keyword=wills
Matt Wills [ Sa, 21 Juli 2007 17:06 ] [ ID #1774855 ]

Re: Help choosing a field from a script

The purpose of the application is to allow the user to perform
multiple file standardization functions. So they will load dirty data
into the application and then use it to make it look nicer. So they
have to be able to choose what field to apply the Title Case function
to.

-S

On Jul 21, 11:06 am, Matt WIlls <I... [at] Witz.End> wrote:
> In article
> <1185027559.592936.125... [at] k79g2000hse.googlegroups.com>squeed2000 [at] yahoo
>
> .com wrote:
> > I am creating a database where I need the user to be able to choose
> > toprocess specified formatting on a field of their choice within the
> > database.
> > So for example, if the database contains State, City and ZIP, I want
> > the user to be able to choose from a script to do a "Title
> > Case"change on any of the above 3 fields.
> > How can I create a script that will allow the user to select any
> > oneof the above 3 fields to perform the text format processing on ?
> > -S
>
> Wondering why you would leave it up to the user to deal with it?
>
> Is there a specific reason you wouldn't just set the fields to
> auto-enter the required change?
>
> Matt
>
> --
> Free FileMaker Technique Demos:http://www.VirtualVermont.com/FMP
>
> My Custom Functions:http://www.briandunning.com/filemaker-custom-funct ions/results.php?ke...
squeed2000 [ Sa, 21 Juli 2007 21:32 ] [ ID #1774856 ]

Re: Help choosing a field from a script

I get what you are saying here, and this is what I tried, but it seems
that in FMP7 the "Set Field" command can not be based off of a
calculation.

Also, is there a way to have FMP choose the fields itself, or do I
have to manually code them.

-S


On Jul 21, 10:52 am, "Ursus" <ursus.k... [at] wanadoo.nl> wrote:
> <squeed2... [at] yahoo.com> schreef in berichtnews:1185027559.592936.125380 [at] k79g2000hse.googlegroup s.com...
>
> >I am creating a database where I need the user to be able to choose to
> > process specified formatting on a field of their choice within the
> > database.
>
> > So for example, if the database contains State, City and ZIP, I want
> > the user to be able to choose from a script to do a "Title Case"
> > change on any of the above 3 fields.
>
> > How can I create a script that will allow the user to select any one
> > of the above 3 fields to perform the text format processing on ?
>
> > -S
>
> Create a value list with the field names
> Create a global text field, <Choices>
> Create a new layout, make it look like a small window
> Put the global on the layout, make the field with check-boxes
> Put on the layout a button that continues the script
> On you main layout make a button <change case>
> Create a script that goes to the new layout. Halt the script. Let the user
> decide what fields to change
> Let him then hit the button that continues the script
> Go back to original layout
> Then change the cases of the fields the user has specified.
>
> You should also let the user be able to chance the case of the current field
>
> Keep well, Ursus
squeed2000 [ Sa, 21 Juli 2007 21:33 ] [ ID #1774858 ]

Re: Help choosing a field from a script

I gathered that.

What I'm suggesting is that FileMaker is capable of cleaning up the
dirty data (e.g., making "new york" OR "NEW YORK" come out as "New
York") without any user action.

In the aforementioned for instance, you set the State field to
auto-enter the calculated value

TextStyleAdd ( State ; Titlecase )

or

Proper ( State )

making sure the "Do not replace existing value of field" box is
unchecked, then every entry into State will be Title Case whether the
original data is or not. If the data is imported, there's a checkbox
where you allow auto-enter to happen.

Thus, you can take care of a large portion of the cleanup, if not all
of it, without a script and without the user having to notice that a
field needs fixing.

Phone numbers can be reformatted as preferred, words can be
abbreviated, common misspellings can be corrected. The Case function
makes for a powerful calculation that can handle as many decisions as
you want it to.

If it's standardization you're after, pretty much anything a user
could do by selecting a field and activating a script can be done with
auto-enter, without any user action.

Matt


In article
<1185046324.895866.263170 [at] w3g2000hsg.googlegroups.com>squeed2000 [at] yahoo.
com wrote:
> The purpose of the application is to allow the user to perform
> multiple file standardization functions. So they will load dirty
> data into the application and then use it to make it look nicer. So
> theyhave to be able to choose what field to apply the Title Case
> function
> to.

> -S

> On Jul 21, 11:06 am, Matt WIlls <I... [at] Witz.End> wrote:
>> In article


>> <1185027559.592936.125... [at] k79g2000hse.googlegroups.com>squeed2000 [at] yah
>> oo

>> .com wrote:
>> > I am creating a database where I need the user to be able to
>> choose > toprocess specified formatting on a field of their choice
>> within the > database.
>> > So for example, if the database contains State, City and ZIP, I
>> want > the user to be able to choose from a script to do a "Title
>> > Case"change on any of the above 3 fields.
>> > How can I create a script that will allow the user to select
>> any > oneof the above 3 fields to perform the text format processing
>> on ? > -S

>> Wondering why you would leave it up to the user to deal with it?

>> Is there a specific reason you wouldn't just set the fields to
>> auto-enter the required change?

>> Matt

>> --
>> Free FileMaker Technique Demos:http://www.VirtualVermont.com/FMP

>> My Custom

>> Functions:http://www.briandunning.com/filemaker-custom-funct ions/resu
>> lts.php?ke...



--
Free FileMaker Technique Demos: http://www.VirtualVermont.com/FMP

My Custom Functions: http://www.briandunning.com/filemaker-custom-functions/resul ts.php?keyword=wills
Matt Wills [ So, 22 Juli 2007 15:16 ] [ ID #1775381 ]

Re: Help choosing a field from a script

<squeed2000 [at] yahoo.com> schreef in bericht
news:1185046432.785769.103590 [at] d55g2000hsg.googlegroups.com.. .
>I get what you are saying here, and this is what I tried, but it seems
> that in FMP7 the "Set Field" command can not be based off of a
> calculation.
>
> Also, is there a way to have FMP choose the fields itself, or do I
> have to manually code them.
>
> -S
>
>

Well with only three fields it is only three if in the script,

But it is easy enough to work around. at least in V8.5, I don't remember if
V7 already had objectnames.

Apply an objectname to each field. You can use the fieldname as object name.
Then use the goto object scriptstep (this can be calculated)
the next script is Set Field without (!!!) specifying the field name. In
this way it will use the currecnt active field.

Keep Well, Ursus
ursus.kirk [ So, 22 Juli 2007 19:24 ] [ ID #1775383 ]

Re: Help choosing a field from a script

In article <46a392c1$0$57909$dbd43001 [at] news.wanadoo.nl>
"Ursus"<ursus.kirk [at] wanadoo.nl> wrote:
> <squeed2000 [at] yahoo.com> schreef in bericht
> news:1185046432.785769.103590 [at] d55g2000hsg.googlegroups.com.. .
>> I get what you are saying here, and this is what I tried, but it
>> seems that in FMP7 the "Set Field" command can not be based off of a
>> calculation.

>> Also, is there a way to have FMP choose the fields itself, or do I
>> have to manually code them.

>> -S

> Well with only three fields it is only three if in the script,

> But it is easy enough to work around. at least in V8.5, I don't
> remember if V7 already had objectnames.

> Apply an objectname to each field. You can use the fieldname as
> object name.Then use the goto object scriptstep (this can be
> calculated)
> the next script is Set Field without (!!!) specifying the field
> name. In this way it will use the currecnt active field.

> Keep Well, Ursus

My memory is only marginally better: I know FM7 did not have object
names, but am not sure natively whether it was 8 or 8.5 that
introduced them. FileMaker's Knowledge Base (Answer ID 6147) describes
how to name an object, saying it is applicable to 8.5, so I think I'll
take their word for it.

Matt

--
Free FileMaker Technique Demos: http://www.VirtualVermont.com/FMP

My Custom Functions: http://www.briandunning.com/filemaker-custom-functions/resul ts.php?keyword=wills
Matt Wills [ So, 22 Juli 2007 21:02 ] [ ID #1775385 ]
Datenbanken » comp.databases.filemaker » Help choosing a field from a script

Vorheriges Thema: Time!
Nächstes Thema: Server 8 backup destinations