SteveS Posted September 17, 2004 Posted September 17, 2004 I figured I would ask the experts for help. I want to know how many months accumulate after a person registered for a particular course. I have two fields; 1) Registration = (date field) and 2) Total = (calculation field). I can make the calculation show the correct amount of days but not the months. I made the calacuation as follows: Status( CurrentDate) - Registration. The calculation result option was set to "number." I would appreciate all the help you could give me. Steve
-Queue- Posted September 17, 2004 Posted September 17, 2004 How do you define a month, 30 days, 31 days, 28 days?
transpower Posted September 17, 2004 Posted September 17, 2004 There are, on average, 365/12 = 30.42 days/month. So Months = ( Status(CurrentDate) - RegistrationDate ) / 30.42. This is approximate, of course. You could loop through the months, add them individually, and get a fraction for the final month.
-Queue- Posted September 17, 2004 Posted September 17, 2004 Then divide the numbers of days by 30 to get the total number of months, the way Ronald did with 30.42.
SteveS Posted September 17, 2004 Author Posted September 17, 2004 I tried ( Status(CurrentDate) - RegistrationDate ) / 30.42 and got the following result. 707789.619329
SteveS Posted September 17, 2004 Author Posted September 17, 2004 A date field without any options selected. Status( CurrentDate) - (date verified) / 30.42 The date verified is the date field.
SteveS Posted September 17, 2004 Author Posted September 17, 2004 The date verified is the registration date.
-Queue- Posted September 17, 2004 Posted September 17, 2004 Um, I mean what is the specific date in your sample?
FMFan Posted September 17, 2004 Posted September 17, 2004 I am trying to sort data per each layout. Filemaker just seems to sort the entire database. Anyone know how to fix this problem? Also, I would like to know how to sort data based on the color of the text. Anyone know how this can be done? Anyone know how to add toggle buttons?
SteveS Posted September 17, 2004 Author Posted September 17, 2004 I somehow fixed the problem. I made another calculate field and divided 30.42 into the results from the previous calculation field and got the answer showing the number of months instead of days.
-Queue- Posted September 17, 2004 Posted September 17, 2004 Sorting affects the entire current found set. If you don't want data to be sorted, you'll have to either find a particular set or omit the unwanted ones before sorting. Data isn't tied to a layout. You will have to set up a particular sort to be performed, depending on which layout you are accessing. I'm not sure what you mean by sorting based on text color. What sort of toggle do you want?
Fitch Posted September 17, 2004 Posted September 17, 2004 FileMaker sorts the found set. Find the records you want, then sort them. I don't think you can sort on the color of text. Although, FileMaker 7 has a GetAsCSS ( text ) function that possibly could be parsed and used for sorting. You'd have an easier time coloring the text based on a calculation, and using that data the calc is based on for the sort. By toggle buttons, you mean a button that changes its appearance? You can create a calculated container field for that. E.g.: Case( status = "on"; gON; gOFF) where status is a text or number field that is set as part of a script when you click the button, and gON and gOFF are global container fields.
FMFan Posted September 20, 2004 Posted September 20, 2004 Does anyone know if I can add a clickable link to a report? I would like to add a url to the report that will allow me to go to the webpage. Thanks.
-Queue- Posted September 20, 2004 Posted September 20, 2004 Is the URL static or dynamic? If static, use the Open URL script step, hard-coded with the desired URL. If dynamic, use the step with the field name instead of text.
Recommended Posts
This topic is 7438 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