dbTalk Databases Forums  

I can't get a text calculation to contain a repeating field.

comp.databases.filemaker comp.databases.filemaker


Discuss I can't get a text calculation to contain a repeating field. in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Carl Mittler
 
Posts: n/a

Default I can't get a text calculation to contain a repeating field. - 08-04-2003 , 02:13 PM






I want to add a sendmail script using repeating field(x3). The text
calculation is used to generate the body text of a quote via email. Every
part of the calculation works fine except for the repeating fields. I can
not get a simple result (example shown below) out of two repeating field.

Qty U PROD COST
100 lbs Sugar .25
250 lbs Sugar .22
500 lbs Sugar .20

Q_Qty is a repeating field x3
Q_Cost is a repeating field x3
Unit and Product are both text fields

Any help with this script would be appreciated.
Carl



Reply With Quote
  #2  
Old   
Henk B
 
Posts: n/a

Default Re: I can't get a text calculation to contain a repeating field. - 08-04-2003 , 03:07 PM






Carl Mittler <cmdesk (AT) optonline (DOT) net> wrote:

Quote:
I want to add a sendmail script using repeating field(x3). The text
calculation is used to generate the body text of a quote via email. Every
part of the calculation works fine except for the repeating fields. I can
not get a simple result (example shown below) out of two repeating field.

Qty U PROD COST
100 lbs Sugar .25
250 lbs Sugar .22
500 lbs Sugar .20

Q_Qty is a repeating field x3
Q_Cost is a repeating field x3
Unit and Product are both text fields

Any help with this script would be appreciated.
Carl
Hi Carl,

Calculation:
"Qty U PROD COST¶" & GetRepetition(Q_Qty; 1) & " " & Unit & " " &
Product & " " & GetRepetition(Q_Cost; 1) & "¶" & GetRepetition(Q_Qty; 2)
& " " & Unit & " " & Product & " " & GetRepetition(Q_Cost; 2) & "¶" &
GetRepetition(Q_Qty; 3) & " " & Unit & " " & Product & " " &
GetRepetition(Q_Cost; 3)

You will have to experiment with the number of spaces to get a proper
formatting of the output. You could use a tab character. Implement that
by having a global field 'gTab' in which you paste a 'tab' character.

Calculation:
"Qty" & gTab & "U" & gTab & "PROD" & gTab & "COST¶" &
GetRepetition(Q_Qty; 1) & gTab & Unit & ... (etc).

Note that not all mail-clients support the tab-character.

Success!
--
Henk B


Reply With Quote
  #3  
Old   
Carl Mittler
 
Posts: n/a

Default Re: I can't get a text calculation to contain a repeating field. Another question ? - 08-05-2003 , 04:37 PM



That did it Henk, Thank you.
I had left out GetRepetition, and called for the field as Q_Cost, 1.
Another question: Is there a way to format the calculation results of
Q_Cost to 2 decimals or currency. I have tried changing the calc results
from Text to Number and I'm still unable to get the formatting I need. 7.20
reads 7.2


"Henk B" <henk.invalid (AT) address (DOT) invalid> wrote

Quote:
Carl Mittler <cmdesk (AT) optonline (DOT) net> wrote:

I want to add a sendmail script using repeating field(x3). The text
calculation is used to generate the body text of a quote via email.
Every
part of the calculation works fine except for the repeating fields. I
can
not get a simple result (example shown below) out of two repeating
field.

Qty U PROD COST
100 lbs Sugar .25
250 lbs Sugar .22
500 lbs Sugar .20

Q_Qty is a repeating field x3
Q_Cost is a repeating field x3
Unit and Product are both text fields

Any help with this script would be appreciated.
Carl

Hi Carl,

Calculation:
"Qty U PROD COST¶" & GetRepetition(Q_Qty; 1) & " " & Unit & " " &
Product & " " & GetRepetition(Q_Cost; 1) & "¶" & GetRepetition(Q_Qty; 2)
& " " & Unit & " " & Product & " " & GetRepetition(Q_Cost; 2) & "¶" &
GetRepetition(Q_Qty; 3) & " " & Unit & " " & Product & " " &
GetRepetition(Q_Cost; 3)

You will have to experiment with the number of spaces to get a proper
formatting of the output. You could use a tab character. Implement that
by having a global field 'gTab' in which you paste a 'tab' character.

Calculation:
"Qty" & gTab & "U" & gTab & "PROD" & gTab & "COST¶" &
GetRepetition(Q_Qty; 1) & gTab & Unit & ... (etc).

Note that not all mail-clients support the tab-character.

Success!
--
Henk B



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.