Field Names in Processing Trick
Nancy Palmquist
nlp at vss3.com
Tue Nov 14 06:17:11 PST 2006
GCC Consulting wrote:
>
>
>
>>-----Original Message-----
>>From:
>>filepro-list-bounces+gccconsulting=comcast.net at lists.celestial
>>.com
>>[mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.c
>>elestial.com] On Behalf Of bobsimcoe at adelphia.net
>>Sent: Monday, November 13, 2006 3:37 PM
>>To: filepro-list at seaslug.org
>>Cc: bob at midcityoffice.com
>>Subject: Field Names in Processing Trick
>>
>>Hi
>>
>>I must have missed this if it was on the list before, but
>>today I found I could assigned a variable, FldName, to hold
>>the Field Name as it appears in Define Files. @wef*, I could
>>prompt the user a each field with the Field Name( starting at
>>Field 4). In my example that follows, I'm prompting the user
>>to Enter the Name, Address and so on at each particular
>>field, when adding a new customer to the customer file. The
>>file has 61 fields, so this saved me lots of typing. Also,
>>using the selection set, called b1browse, displays a
>>different prompt if the user is in fields, 31,39,42,43, and
>>45, save more typing.
>>
>>Sorry about the odd characters in the example below.
>>
>>
>> +-------------------------+ 5
>> | D E F I N E F I L E S |
>> +-------------------------+
>> Number -------------Field Heading-------------- Len --Type-
>> 1 - MasterCustNo ? 6? rjfill0
>> 2 - IntCustNo ? 6? rjfill0
>> 3 - CreateDate ? 10? mdyy/
>> 4 - Customer Number ? 10? allup
>> 5 - Customer Name ? 35? allup
>> 6 - Address Line 1 ? 35? allup
>> 7 - Address Line 2 ? 35? allup
>> 8 - Address Line 3 ? 35? allup
>> 9 - City ? 20? allup
>> 10 - State ? 2? stprov
>> 11 - Zip Code ? 10? zipna
>> 12 - County ? 25? allup
>> 13 - WebSite Address ? 70? *
>> 14 - A/P Contact ? 35? uplow
>> 15 - A/P Phone ? 14? phone
>>
>>etc.
>
>
> This feature has been available since version 1.
>
> However, the field names MUST be contiguous.
>
> Your Zip code - Zip_code
> Customer Number - Customer_number
>
> The simplest way is to edit your map by adding an underscore to those fields
> you wish to use by name.
>
> i.e amount=qty_shipped*cost is clearer the 10=5*8 (not referring to the
> above map)
>
> The one thing to be careful of is that you don't declare a long variable
> with the same name as your field name. This may cause unwanted results.
>
> You can't use the long name in lookups - ab=foobar(masterCustNo) will not
> work. Although it may sometime in the future.
>
Richard,
You misunderstood his posting.
He is not using the Field Heading as a representation of data, he is
using the text as a prompt.
@wef* FldNumber = @fd ?
3 ------- - - - - - - - - - - - - - -
? If: ?
Then: FldName = fieldname( - , FldNumber ) ?
4 ------- - - - - - - - - - - -
? If:
Where FldName now contains the heading of the field he just entered
Then he uses FLDNAME to create a prompt to the user:
11 ------- - - - - - - - - - - - - - - -
? If: 'else ?
Then: showctr("21") "Enter " < FldName ; return ?
12 ------- - - - - - - - - - - - -- - -
? If:
So it will say at the bottom of the screen:
ENTER Address Line 1
when they are entering field 6.
I recently rediscovered the fieldname(), fieldval() functions and hoped
against all hope that the first option could be an expression but alais
it can not.
fieldval(lookupname,fieldnum), lookupname can not be an expression,
fieldnum can be an expression.
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list