Newbies japanik Posted July 5, 2006 Newbies Posted July 5, 2006 Maybe basic, but to hard for me. I have a database for events with start day and end day. I need to add event status, which update automatically: Today is more than 100 days away: status: coming Today is less than 100 days away: status: preparing Today is past start day: status: running Today is past end day: status: closed I like the idea to use 4 radio buttons which jump to the right status automatically. (High visibility and easy for searching) Can anybody help?
Oldfogey Posted July 5, 2006 Posted July 5, 2006 (edited) When you say "Today is more/less than 100 days away" do you mean the Start Day is 100 days more/less away? Assuming that is the case, try this. Define a Value List, say 'Progress' consisting of "coming", "preparing", etc. Define a field, say 'Status', as calculation - Case(get(CurrentDate) > end day; "closed"; get(CurrentDate) > start day AND get(CurrentDate) < end day; "running"; start day - 100 > get(CurrentDate); "coming"; start day - 100 < get(CurrentDate) AND end day > Get(CurrentDate); "preparing") On your layout set Status as a Radio button set, using the Value List 'Progress'. (Because I'm lazy, I would not do it that way. I'd use 1, 2,3 and 4 for the status values and the valuelist; put the four words on the layout as plain text one under the other and have the field 'Status' next to them as a field just big enough to hold the buttons.) Edited July 5, 2006 by Guest
Søren Dyhr Posted July 5, 2006 Posted July 5, 2006 You have to distinguish between displaying and seaching, and for the display purpose is radiobuttons a bad choise of metaphor because it usually are associated with a user interface. Next issue is the use Get(CurrentDate), if you try to make it a searchable calc'field is going to produce unstored seaches - or the function proves unreliable. But the way to make each record show it's status, as unstored information rendered with the layout approached, is by using this unstored calc' LeftWords ( Case( StartDate - 100 > Get ( CurrentDate );"Comming"; EndDate < Get ( CurrentDate ) ; "Closed"; EndDate > Get ( CurrentDate ) and StartDate < Get ( CurrentDate );"Running";"Preparing") ; Length ( StartDate ) * Length ( EndDate ) * Sign ( EndDate-StartDate )) ...using that the case structure makes stop at first true condition, this dictates some reshufling of the conditions. I would suggest that this calc pulls in according background colours, showing these status informations, just remember that the larger real estate you need to render the slower it gets. Next issue is the searching, which should lean up against: http://www.filemakerpros.com/Overdue2.zip and perhaps this: http://previews.filemakermagazine.com/videos/544/SavedSearches_full.mov --sd
Oldfogey Posted July 5, 2006 Posted July 5, 2006 If search time is an issue, which I would doubt for this application, then you would set the Case statement so the most likely condition was the first one tested.
Newbies japanik Posted July 5, 2006 Author Newbies Posted July 5, 2006 Oldfogey and Søren, thanks a lot for your inputs. I tried Oldfogeys solution and it works. Thank you very much. Also Sørens concerns about searching time is very interesting. Of course I would like to have my solution as quick as possible. But so far, in Sørens solution I need to open the file and run the script from time to time by pushing the button. My idea is to create a dynamic value list, which contains only coming and running events, and events in preparation. This value list I like to use in an other file, where I can create jobs/projects, for a certain event (therefore I don't need to see passed events). Of course speed is always an issue, but most important is, that the dynamic value list of events is always automatically up-to-date....
Søren Dyhr Posted July 5, 2006 Posted July 5, 2006 I gave you idea a stab, i've inclosed a few custom functions 1) a constant = gggggggggggggggg and 2) http://www.briandunning.com/cf/39 The template can easily be modified to avoid these, but one of the issues that needed attention was the freshing of the layout, hence the script.... --sd filterEvents.zip
LaRetta Posted July 6, 2006 Posted July 6, 2006 Nice demo but I don't see where japanik has FM8 Advanced.
Søren Dyhr Posted July 6, 2006 Posted July 6, 2006 Hence the comment that the CF's could be avoided! But you are the first taking any notice of it, so it can't be an issue for anything except say oblivience : - I do always as a kind of test put in socratic noise ...Do you remember Ugo's disclaimer, not to use anything straight from his brain.... You have to know if the questioner really thinks the approach thru, or just carbon copies unconsciously! --sd
LaRetta Posted July 6, 2006 Posted July 6, 2006 But you are the first taking any notice of it, so it can't be an issue for anything except say oblivience But Soren, the poster can't even SEE your custom functions so it would be an issue, don't you think? This post is supposed to help japanik ... who will have no idea how you created the bar. If you would have at least put it as straight calc, he could use that part.
Raybaudi Posted July 6, 2006 Posted July 6, 2006 Hi Soren on Windows the tecnique of positioning an invisible box over the real MULTIPLE "check box" doesn't work right... I had to find them in layout mode and reposition them over the checks ! That must be due to the different lenght of characters (font). Maybe it was better to make a vertical CheckBox set.
Søren Dyhr Posted July 6, 2006 Posted July 6, 2006 can't even SEE your custom functions so it would be an issue, don't you think? I wrote about them in my posting in the forum though, but to establish if it's in the vicinity of what desired ...isn't it urgent to know all the inner secrets at once. It can run on a normal version, although Daniele mentions a cerning problem with the webdings font. --sd
Raybaudi Posted July 6, 2006 Posted July 6, 2006 Soren, not with Webdings font, but with the square invisible buttons that you placed over the checks. Those checks are in different posizion in MAC vs. WIN, due to the different char spacing. So, when you try to push a check, it does nothing. BTW: webdings fonts gives other minor problems too.
Recommended Posts
This topic is 6776 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now