Help! With Case Calc. 
Author Message
 Help! With Case Calc.

I made a post earlier and did not get a response.  So I thought I'd try
again.

I'm using FM 4 on Win98.

I'm trying to use the case calc. to evaluate a value list in repeating
field.  Below is a copy the calculation:

Case( Standard Items = "Lot Plat" , Company::LotPlat , Standard Items =
"Permit Plat" , Company::PermitPlat ,  Standard Items = "Foundation Layout"
, "FL",  Standard Items = "Foundation Spot" , "FS" ,  Standard Items = "Fine
Grade Staking" , "FGS" ,  Standard Items = "Final Grade Verification" ,
"FGV" ,  Standard Items = "Sidewalk Staking" , "SS" ,  Standard Items =
"Mortgage Survey" , "MS" ,  Standard Items = "Stake Lot Corners" , "SLC"
,"")

It work fine for the first item.  It then returns a blank for the second
repeat.  It then works if put something like "FL" in quotes.  I obviously
want it to work with the related field.  Any suggestions about how to fix
this.  If there is another way feel free to make that suggestion.

Thanks in advance.

Brian



Sun, 24 Aug 2003 11:21:10 GMT
 Help! With Case Calc.

Not quite sure which guy is the repeating field, and if I'm not, neither is
Filemaker. In other words, nothing in your calculation indicates which
repetition of a repeating field is supposed to be used, and in which part of
the Case statement.

There is no way, in a Case statement, to target a specific repetition. You
can't say, 'If x, then the 2nd repetion will be y'. But, using the
GetRepetition function, you can say which repetion would supply the value.
Thus, if "PermitPlat" is the repeater, then:

Case(Standard Items="Lot Plat", GetRepetition(PermitPlat, 4)

would work, or

Case(GetRepetition(PermitPlat,4)= 12, Company::LotPlat)

would also work.

A value list cannot be evaluated by a calculation, but a field formatted
with a value list can be evaluated, although the calculation doesn't care
how the field is formatted. I'm making the distinction to point out what may
be a confusion on your part, or may just be inprecision with the terms.

The calc you post here seems to be using related fields (the "::"). Is that
what you meant? That can work-- again, I'm just trying to be clear.

Without knowing more about what your overall goal is, it's tough to give
much advice about what might be a better choice.

--

John Weinshel
Datagrace
Associate Member, Filemaker Solutions Alliance
Vashon Island, WA
(206) 463-1634


Quote:
> I made a post earlier and did not get a response.  So I thought I'd try
> again.

> I'm using FM 4 on Win98.

> I'm trying to use the case calc. to evaluate a value list in repeating
> field.  Below is a copy the calculation:

> Case( Standard Items = "Lot Plat" , Company::LotPlat , Standard Items =
> "Permit Plat" , Company::PermitPlat ,  Standard Items = "Foundation
Layout"
> , "FL",  Standard Items = "Foundation Spot" , "FS" ,  Standard Items =
"Fine
> Grade Staking" , "FGS" ,  Standard Items = "Final Grade Verification" ,
> "FGV" ,  Standard Items = "Sidewalk Staking" , "SS" ,  Standard Items =
> "Mortgage Survey" , "MS" ,  Standard Items = "Stake Lot Corners" , "SLC"
> ,"")

> It work fine for the first item.  It then returns a blank for the second
> repeat.  It then works if put something like "FL" in quotes.  I obviously
> want it to work with the related field.  Any suggestions about how to fix
> this.  If there is another way feel free to make that suggestion.

> Thanks in advance.

> Brian



Sun, 24 Aug 2003 11:43:44 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. need help with report calc and query calc

2. CASE statement in calc field not working

3. Problem with Case Calc. in repeating field

4. Upper case conversion calc?

5. HELP HELP using CALC PLEASE

6. Help! Transform lower case to upper case

7. NEWBIE calc help requested

8. Need Measure calc help

9. Need help with Calc member...sum of maxes of all descendants

10. Calc avg help

11. Help avoid Cursor to calc Correlation

12. help with calc'ed column query


 
Powered by phpBB® Forum Software