dbTalk Databases Forums  

Currency - conditional formatting

comp.databases.filemaker comp.databases.filemaker


Discuss Currency - conditional formatting in the comp.databases.filemaker forum.



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

Default Currency - conditional formatting - 01-17-2010 , 09:32 PM






FM 8.5

I have a setup that deals in several currencies. I am trying to create
a system whereby the currency symbol displayed alongside a price field
is a function of the text content of a Sku (here called Product Tag).

Rather than formatting the Price field, number, with a currency symbol
- and since I do not know how to create conditional formatting, I
would create a Currency field that displays the desired result based
on other data.

I could make the Currency Field part of the Product Table but my
Invoice has a fields outside the Line/Product portal, such a subtotals
and below the line sums.

Therefore I created Currency Field with the following calculation;

Case(
PRODUCTS_EURO 2::Product_Tag and Left ("E";1); "€" ;
PRODUCTS_EURO 2::Product_Tag and Left ("C";1); "$" ;
PRODUCTS_EURO 2::Product_Tag and Left ("U";1); "$"
)

Then Product Tag - EDB40BG , would produce the result € and UWC33BW
would produce $ etc..

This is not working. Any explanations or thoughts on my approach?

Thanks
Matthew

Reply With Quote
  #2  
Old   
Grip
 
Posts: n/a

Default Re: Currency - conditional formatting - 01-17-2010 , 10:26 PM






On Jan 17, 8:32*pm, Buckbuck <buck.matthe... (AT) yahoo (DOT) com> wrote:>
Quote:
I could make the Currency Field part of the Product Table but my
Invoice has a fields outside the Line/Product portal, such a subtotals
and below the line sums.

Therefore I created Currency Field with the following calculation;

Case(
PRODUCTS_EURO 2::Product_Tag *and * Left ("E";1); "€" ;
PRODUCTS_EURO 2::Product_Tag *and * Left ("C";1); "$" ;
PRODUCTS_EURO 2::Product_Tag *and * Left ("U";1); "$"
)

Then Product Tag - EDB40BG , would produce the result € and UWC33BW
would produce $ etc..

This is not working. Any explanations or thoughts on my approach?
Your general approach is ok, though depending on the number of
currencies, I'd consider a lookup table.

In terms of your calc, I'd recommend reading the help file on the
syntax of the Left() function. Your calc will never work the way it's
written.

G

Reply With Quote
  #3  
Old   
Your Name
 
Posts: n/a

Default Re: Currency - conditional formatting - 01-17-2010 , 11:39 PM



"Buckbuck" <buck.matthew74 (AT) yahoo (DOT) com> wrote

FM 8.5
Quote:
I have a setup that deals in several currencies. I am trying to create
a system whereby the currency symbol displayed alongside a price field
is a function of the text content of a Sku (here called Product Tag).

Rather than formatting the Price field, number, with a currency symbol
- and since I do not know how to create conditional formatting, I
would create a Currency field that displays the desired result based
on other data.

I could make the Currency Field part of the Product Table but my
Invoice has a fields outside the Line/Product portal, such a subtotals
and below the line sums.

Therefore I created Currency Field with the following calculation;

Case(
PRODUCTS_EURO 2::Product_Tag and Left ("E";1); "€" ;
PRODUCTS_EURO 2::Product_Tag and Left ("C";1); "$" ;
PRODUCTS_EURO 2::Product_Tag and Left ("U";1); "$"
)

Then Product Tag - EDB40BG , would produce the result € and UWC33BW
would produce $ etc..

This is not working. Any explanations or thoughts on my approach?
It's the right approach, but your comparisons are wonky and are not testing
what you think they are.

In English what you are trying to do is:
If the Left character of the data in the Product_Tag field is an "E",
then use the Euro symbol,
If the Left character of the data in the Product_Tag field is an "C",
then use the Dollar symbol,
If the Left character of the data in the Product_Tag field is an "U",
then use the Dollar symbol,
etc.

Change this directly into FileMaker comparisions exactly as they read above:
i.e.
Case(
Left(PRODUCTS_EURO 2::Product_Tag ;1)="E"; "Euro";
Left(PRODUCTS_EURO 2::Product_Tag ;1)="C"; "$";
Left(PRODUCTS_EURO 2::Product_Tag ;1)="U"; "$";
etc.
)

There's no "ands" in the English version, so there's no need for "ands" in
the FileMaker comparisons.

(I haven't tried to put the actual Euro symbol in since it may get dropped
out by some newsservers / newsreaders.)

Helpfull Harry )

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.