tobbesfilemaker Posted September 27, 2012 Posted September 27, 2012 Hey.. I have two fields, date_created and date_fixed.. How can I make a calculation that says the number of days that went between those two? If I for example choose 2012-09-27 in created field and 2012-09-30 in fixed field, then the calc should have been 3 days. Any suggestions?
comment Posted September 27, 2012 Posted September 27, 2012 Simply subtract the two = date_fixed - date_created The result type should be a Number.
MikeKD Posted January 17, 2015 Posted January 17, 2015 I'm using this formula in a calculation field to attempt to give the number of days till the next holiday. gNextHoliday - Get (CurrentDate) The c field is set to unstored, the gNextHoliday date is set from the calendar picker, but nothing shows. I can't think what else I could have done wrong - any ideas anyone?
LaRetta Posted January 17, 2015 Posted January 17, 2015 Hi Mike, Make sure the field you have the drop-down calendar attached to is actually the right field and that it is type global - just beginning it with 'g' does not make it global. The calculation field would automatically set itself to unstored and would work under ALL circumstances even if no records were present and even if you haven't committed the record yet. 1
MikeKD Posted January 17, 2015 Posted January 17, 2015 Thanks LaRetta, I hadn't set it to global!! What a fool! I am a bit disapointed that FM realise that gNextHoliday should have been a global field though. - I attribute at least half of this error to software :-)
LaRetta Posted January 17, 2015 Posted January 17, 2015 How would FM know it should be global? That is for the developer to decide. Not everyone begins their fields with 'g' so FM couldn't go by that ... some trail their fields with '_global' and some put globals in all caps (FMStandards). So you are joking, right? :-)
bcooney Posted January 17, 2015 Posted January 17, 2015 I'm sure he's joking, LR, but man, been there done that!
LaRetta Posted January 17, 2015 Posted January 17, 2015 Hi Barbara! Surprisingly, I've known a few folks who really thought beginning it with 'g' makes it global - absolute truth! I take nothing for granted.
MikeKD Posted January 17, 2015 Posted January 17, 2015 Yes I was joking!! (quickly calls lawyer to cancel legal action) (That was a joke too!)
mikedr Posted January 18, 2015 Posted January 18, 2015 I so have this same issue -- totally a FileMaker bug. I type "cleintnumber" and it's very much obvious I mean "clientnumber" but FM doesn't fix it. I mean, c'mon!
Lee Smith Posted January 18, 2015 Posted January 18, 2015 I don’t think we know enough about what you are doing to call it a Bug? In what context are you “typing a client’s name”, i.e. find mode, drop down menu, global field, etc. How about a demo file of what is involved? Is there relationships involved. have you check the fields for matching types, is the relationship based on indexable field?
mikedr Posted January 18, 2015 Posted January 18, 2015 Hi Lee -- not sure if your post was with respect to me, but a total joke. I'll accidentally transpose characters in a field name or a variable name within a script, and then am flummoxed why it doesn't work properly, until I check to see that I didn't enter the name correctly! :)
MikeKD Posted January 18, 2015 Posted January 18, 2015 Is the omission of an autocorrect for scripts and relationships another undocumented feature? (Sorry my sense of humour is so poor that it's dragged down the level of this thread)
OlgerDiekstra Posted January 18, 2015 Posted January 18, 2015 Autocorrect like on an iPhone? Then we can have websites like iPhone Autocorrect bloopers for Filemaker. That'd be really cool. :-P
mikedr Posted January 18, 2015 Posted January 18, 2015 Ok, I didn’t pick up on the joke. No worries. Backstory is that I did a mock up of the logic I wanted to add to a script, and it worked perfectly, and then when I built it into the production script, it didn't work . . . . I transposed two letters in a variable I was using.
Recommended Posts
This topic is 3654 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