dbTalk Databases Forums  

Re: newbie baffled...

comp.databases.filemaker comp.databases.filemaker


Discuss Re: newbie baffled... in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: newbie baffled... - 09-07-2005 , 01:00 AM






What something like :
field2 = Case(field1 = "breakfast", "2am", field1 = "lunch", "4am",
field1 = "dinner", "6am", "")
or
field2 = Case(field1 = "breakfast", "2am", "")
field3 = Case(field1 = "lunch", "4am", "")
field4 = Case(field1 = "dinner", "6am", "")
Remi-Noel


"Jonathan Peirce" <president (AT) whitehouse (DOT) gov> a écrit dans le message de
news: 070920050001377364%president (AT) whitehouse (DOT) gov...
Quote:
hi: im kinda new using filemaker 7 and having a bit of a problem:

i have one layout that is basically 24 fields labelled as times, ie
12am, 1am, 2am, 3am, etc...they are pull down menus with values such
as
breakfast, dinner, lunch, etc.

then i have a layout that has fields named breakfast, lunch, dinner,
etc...

my problem:
i want to be able to choose a value for certain fields in layout 1,
(like 2am=breakfast) and have the breakfast field (in layout 2) then
show 2am...

I have read my manual, and books, and have been trying calculations,
scripts, etc... but no love. can anyone steer me in the right
direction?

thanks
JP

--
---------------------------------------------------------------------------------
"I'd sell my soul for a Formula 1 racing car" - Bart Simpson
---------------------------------------------------------------------------------


Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: newbie baffled... - 09-07-2005 , 01:21 AM






In article <070920050001377364%president (AT) whitehouse (DOT) gov>, Jonathan
Peirce <president (AT) whitehouse (DOT) gov> wrote:

Quote:
hi: im kinda new using filemaker 7 and having a bit of a problem:

i have one layout that is basically 24 fields labelled as times, ie
12am, 1am, 2am, 3am, etc...they are pull down menus with values such as
breakfast, dinner, lunch, etc.

then i have a layout that has fields named breakfast, lunch, dinner,
etc...

my problem:
i want to be able to choose a value for certain fields in layout 1,
(like 2am=breakfast) and have the breakfast field (in layout 2) then
show 2am...

I have read my manual, and books, and have been trying calculations,
scripts, etc... but no love. can anyone steer me in the right
direction?
It really depends on what else you're wanting to do with the fields and
the data.

The simplest method would be: rather than 24+ fields with specific
functions, why not have two sets of 5 fields (for example) that can be
used for anything.
ie.
Event 1 Time 1
Event 2 Time 2
Event 3 Time 3
Event 4 Time 4
Event 5 Time 5

The "Event" fields can use pop-up menus of text labels ("breakfast",
"lunch", etc.) and the second set us another pop-up menus of times.

That way no matter what layout you're looking at the data will match
easily by simply having the appropriate fields next to each other.



The time consuming method would be to have a duplicate set of 24+
fields that are calculations using Case to obtain the correct value.
eg.
2amCalc = Case (Breakfast = "2am", "Breakfast",
Lunch = "2am", "Lunch",
Dinner = "2am", "Dinner",
...,
"")

LunchCalc = Case (2am = "Lunch", "2am",
3am = "Lunch", "3am",
4am = "Lunch", "4am",
...,
"")

Obviously you would need one of these for each time and each label, but
this would be painful to ammend each time you wanted to add a new text
label or time.



The better method would be to store the events and their times in a
second file / table and use relationships and portals to display the
data in the original file / table, but if you're really a "newbie" that
might not be a good option to try until you're more familiar with
FileMaker's relationship abilities since it is more complicated.



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
FP
 
Posts: n/a

Default Re: newbie baffled... - 09-07-2005 , 03:15 AM



I agree with what's been said so far, it's not the best approach but if
you insist you can do it as follows:
- assume your 24 Time fields are Time1, Time2, Time3...
- the calculation in the "Breakfast" field would say:
Case(
Exact(Time1, "Breakfast"), Time(1, 0, 0),
Exact(Time2, "Breakfast"), Time(2, 0, 0),
Exact(Time3, "Breakfast"), Time(3, 0, 0),
....)


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.