Calculation inconsistancy

Viewing 21 reply threads
  • Author
    Posts
  • November 21, 2017 at 5:57 PM #26052

    Chris Knight
    Participant

    Hi,

    I’m trying to figure out how to work with dates in calculations as I’ve found that they are not very well explained anywhere that I can find. Specifically, creating calculated dates based from the current date. In the online user guide there is a reference to a Unicode standard that has helped understand the date format but not really the behavior, limitations and correct usage of the TapForm date functions. There have been some forum posts but many/most seem that they are outdated and prior to the inclusion of the majority of the date functions.

    I have a sample form that is just for toying around with calculated fields and it has a dozen or so fields that are calculated fields with various experiments in them. I am finding that formulas don’t always produce the same displayed result even though everything is the same except the field name. This doesn’t make any sense to me.

    For example, I have a field called month_year and in it is the calculation CONCAT(SUM(DATE(TODAY(); "LL"),1),"/",DATE(TODAY(), "YYYY") )
    and it is set to return text. All of the fields attributes are at the defaults when the field was created. This field is displaying, “12/2017” as I expected it should. I have a second calculation field with exactly the same formula, copy and pasted, has the same return as text and all the field parameters as defaulted when created and this field displays, “12”. I would not be surprised if my formula is not valid for some reason but I don’t get why it would behave differently in two identical, except for field name, fields. It occurred to me that maybe on the third parameter, the comma in the function is messing it up, making the parser think there are four parameters to concatenate but why then would I ever get “12/2017” as a result. I tried to do another field called month_year_2 with the formula CONCAT((SUM(DATE(TODAY(); "LL"),1)),"/",(DATE(TODAY(), "YYYY")) ) in it thinking that maybe isolating each parameter to concatenate would make a difference or at least not make any difference at all. The result I received was, “1”. I’ve no idea at all where and how it came up with only “1”. At lease the duplicate field that produced “12” made sense that it was the first parameter that should have appeared. I suppose “1” is the first character that should be in the output but is that really where it is coming from? Why would the parser stop on just the “1”? I think there must be something more fundamentally wrong with my formula but I’ve no idea what it is.

    Another oddity is a field I made called year. It currently has the formula DATE(TODAY() ;"yyyy") in it but previously was DATE(TODAY() ;"YYYY") and the behavior was the same. Every now and then if I make an error in another field’s calculation, i.e. miss a comma or parenthesis or otherwise non-working formula, the year field goes blank when it previously had displayed “2017”. If I edit the calculation but not actually change it when I am done the result displays again correctly.

    Yet another oddity is if I change the formula in month_year to reference the year field instead of the year calculation – it simply doesn’t work at all and the field result is blank. In fact, I have found that I can almost never reference a field that has date calculation in it as an intermediate step in my experiments. My assumption has been that I must have an error in them someplace but I’m not figuring out what those errors are. No errors are displayed, just the calculated field goes blank and usually so do any referenced fields.

    My guess is I am missing something fundamental in my attempts with how to work with the date functions any advice on what I am doing wrong would be appreciated.

    Thank you kindly,
    ~Chris

    November 21, 2017 at 10:04 PM #26054

    Brendan
    Keymaster

    Since DATE() returns a text value, it doesn’t make sense to apply the SUM() function to it. And if you’re referencing any Calculation fields that have an error in them, then the result will be empty.

    There are errors that are dumped to the log file, but they’re not entirely user friendly errors in my opinion. But they can be a clue to the problem.

    You could launch the Console application and type in Tap Forms into the search field.

    You might see something like this in the log as you enter in a value into a field referenced by a formula:

    invalid formula - unable to parse: Sub expression <X> in <DATE(X, "YYYY-MMM-dd")> is not valid.

    November 21, 2017 at 11:02 PM #26055

    Chris Knight
    Participant

    That is lot of help, yeah the messages are not super great but it something more that I had that is at least clue. Too bad they don’t show up always for every error I make playing around with it. Thanks!

    I was wondering about that date() function and when my calculations seemed to work I thought maybe internally it was a number. How would you recommend getting a date that is sometime in the future? I thought about just adding seconds to now() but since not all months have the same seconds in them and plus the leap year problem I am kind of at a loss to programmatically create an accurate future date.

    For example, an expiration date of a warranty that is the earliest business day that is three months from date of purchase. I know the purchase date, and a calculated field would be nice to display the future date.
    Or maybe how many days until Thanksgiving 2018? It is always the third Thursday of the eleventh month but how can I enter that in as a date for a calculation? My automatic payment for internet comes out the 15th of every month unless it falls on a weekend in which case it is the following Monday. How many days from now() until my next internet payment? I see a lot of great possibility with the new date functions but I keep getting stymied with how to get the future date programmatically to use them in my experiments. In fact, I can’t figure out how to hardcode a date into any of those date functions either.

    One of my experiments was to try and get the current year as number. I tried YEARS(TODAY()-TODAY(),TODAY()) with the idea that today from today would be zero and zero to today would be the number of years. Turns out the answer is “47”. So what I think of as zero is unfortunately evaluates to apparently the Unix Epoch. I read an old forum post here that missing dates will be replaced by January, 1, 1970. I create a date field called date and put in it 01/01/0001 and used that in YEARS(DATE,TODAY())+1 and that works for giving me a number that is years but it would require that I put that have that date field on all my forms and enter it in every time since there is no way I can find to persist data or do a lookup or default a hardcoded value to a field. And I would have to do that for years, months and days. To get each of those as number of today. There has got to be a better way to do this. How would you do this?

    November 22, 2017 at 12:17 AM #26056

    Brendan
    Keymaster

    Dates in Tap Forms are treated as the number of seconds from the Unix Epoch date/time, which is January 1, 1970 00:00:00 GMT. So you could put in the number of seconds as a specific date. Although if you’re referencing a Date field itself, you don’t have to convert that to the Unix Epoch date/time because Tap Forms does that for you, then it injects the converted value into the formula as seconds.

    TODAY() - TODAY() = 0, so you would be getting the date from January 1st, 1970 00:00:00.

    In Objective-C when I’m working with a Date field and I want to get a specific future date, I would use a function called dateByAddingComponents

    For example, to get tomorrow’s date and yesterday’s date, I would do it like this:

    + (NSDate *)tomorrow {
    	NSDateComponents *components = [[NSDateComponents alloc] init];
    
    	components.day = 1;
    
    	return [[NSCalendar currentCalendar] dateByAddingComponents:components
    	                                                     toDate:[NSDate date]
    	                                                    options:0];
    }
    
    + (NSDate *)yesterday {
    	NSDateComponents *components = [[NSDateComponents alloc] init];
    	
    	components.day = -1;
    	
    	return [[NSCalendar currentCalendar] dateByAddingComponents:components
    														 toDate:[NSDate date]
    														options:0];
    }

    I would probably need to write a math function that given a date, allows you to set the various date components and then get another date in return.

    Here’s an example of getting the next month date from today:

    + (NSDate *)nextMonthFromToday {
    	NSDateComponents *components = [[NSDateComponents alloc] init];
    	
    	components.month = 1;
    	
    	return [[NSCalendar currentCalendar] dateByAddingComponents:components
    														 toDate:[NSDate date]
    														options:0];
    }

    Right now to get a date that’s 3 months in the future, you wouldn’t be able to get an accurate result because there are different numbers of days in the month and all you could do is add 90 days to the specified date. That wouldn’t of course take into consideration leap years either, so it would be off. If I opened up access to the above method, then you would be able to do it.

    Let me think about it.

    November 22, 2017 at 12:36 AM #26058

    Brendan
    Keymaster

    What about a function that looks like this:

    DATEADD(Date, Y, M, W, D, H, M, S)

    Given a Date value, you could add Years, Months, Weeks, Days, Hours, Minutes, and Seconds. I’m not sure if seconds is required though. Would someone really want to add a specific number of seconds to a date?

    But what you could do with something like this to add 3 months to a date:

    DATEADD(Date, 0, 3, 0, 0, 0, 0, 0)

    or maybe add 6 weeks and 3 days:

    DATEADD(Date, 0, 0, 6, 3, 0, 0, 0)

    November 22, 2017 at 4:31 AM #26059

    Chris Knight
    Participant

    Hi Brendan,

    I really like that DATEADD function idea. I think it would almost solve all my thought experiments. I think it would also solve the question a poster had a day or two ago that had something to do with finding a duration between now and some date in the future. I think having the tool there gives people the ability to be more creative with what they can do in TapForms and extend its use.

    I personally can’t think of anything I would want to track seconds for at the moment in a database but I know that people who work with sound and/or video tracks work in seconds all the time. If it isn’t that much trouble for you, then why not?

    Just out of curiosity, would it be easier to have a TIMEADD(Time, H, M, S) and a DATEADD(Date, Y, M, W, D) ? It is not really on topic but I think the time attached to the date is kind of annoying. For example, if I use TODAY(), I get a result that always has “at 12:00 AM” attached when I display it because there isn’t a choice for “none” in the time format of a calculation field and the 12:00 AM isn’t even what time is.

    What the DATEADD function does not allow me to do is create and arbitrary date programmatically. I have to have a date field and put and arbitrary date in it and then do that on every form I want to use since I can’t persist data in a field from form to from. Something like DATE(Y, M, W, D, H, M, S) but that still wouldn’t do the trick for third Thursday of November. If I was trying to use DAYS(x,y) with TODAY() and a hardcoded formula for the third Thursday of November there is no option or way to express that in a date that I know of.

    I think you need a function or two that works with days of the week. A lot of people are paid on day of the week. Like every other Friday or every third Monday or every Tuesday are ones that I’ve personally had in the past. Maybe just a function that answered a question like, what date is the third Thursday of November, 2019? So maybe, DAYDATE(N, D, M, Y) where N is the number of days of the week into a month, D is 1-7 for the day of the week, M is the month and Y is the year. Returns a Date. One could answer the question what day is any Thanksgiving going to fall on. How many paydays will there be in a particular month and with some repetition they could find how many paydays in a year. Nesting it in one of the new duration functions someone could find out how long until some particular day of the week in the future without having to get out the calendar and look it up and then enter that value – let the computer and TapForms figure it all out. I think the DATEADD function would be great but it does miss all use cases that need a day of the week.

    Thanks for all you thought and work on this – I’m excited to see what you will do,
    ~Chris

    November 22, 2017 at 3:46 PM #26062

    Jose Monteiro
    Participant

    Hi,

    I’m not Brendan. :)
    But I’m interested in these matters too.

    Sorry if my english is not good enough but I’ll try to do my best.
    And I agree that we need a few more functions related with dates.
    But asking Brendan to find them for us is quite an impossible task.
    He has to guess what we need.
    We have to tell him exactly what our needs are.
    The inputs we have, and the outputs we want; then he might try to find some procedure for a function doing that job.
    Creating a function for every user request would not make sense.
    I think what we need is a few general date functions as tools to build whatever we need with them.
    But it will be our job to state exactly what we need.

    For example you agreed with my request of having a function to convert a string of digits to an integer value.
    This one would be a general function we would use often when working with dates.

    And we need to be specific when stating our needs.
    For instance when you say having a date three months from now what do you really mean?
    Today is Nov 22.
    Do you mean Feb 22 2018?
    Do you mean today plus 90 days (an average value of 30 days per month)?

    I would like to hear from you exactly what general functions you think would be useful to have to allow us solve our date problems.
    I mean:
    – suggested function name
    – function input: arguments and its type (number, string, date, …)
    – what the function should do
    – function output and its type

    And a manual about functions (not only date functions) stating exactly how they work, inputs, outputs, and a few examples using them, is something we don’t have.
    Unfortunately I think Brendan, with so many requests and problems to solve, will not have time to do that.
    Perhaps, at our own pace, we could build a TF Form with all that information, with Brendan as a consultant :) , and make it available to all users.
    I have some spare time I could use on that job.

    Regards,

    Jose

    November 22, 2017 at 5:03 PM #26063

    Brendan
    Keymaster

    Hi Chris,

    It’s not easier to have 2 separate functions. I’ve already built it with one function:

    DATEADD(Date,Y,M,W,D,H,M,S)|Adds the date components to the specified date.|For example: DATEADD(Date,0,3,0,2,0,0,0) will add 3 months and 2 days to the specified date. Y = Years, M = Months, W = Weeks, D = Days, H = Hours, M = Minutes, S = Seconds.

    You can disable the Time display as long as you set the Date portion to something other than Default.

    I guess with so many parameters though it could be hard to keep track of which parameters are for what. Unfortunately these are just simple functions, not a full language, so there’s no support for named parameters.

    There’s an additional date component called Weekday Ordinal that would allow me to let you answer those questions. With that, your DAYDATE() function idea could certainly work.

    November 22, 2017 at 5:08 PM #26065

    Chris Knight
    Participant

    Hello Jose,

    Welcome to the conversation, glad to have you. I’ve read a lot of your older post in the forum and have learned many things, especially with your conversation with Mike.

    Yes I did agree that we need a way to get a date component as a number at least if appropriate as number. I don’t know though that what I would want would be a str2int type function for the existing DATE function. I think what I would like the most for this would be a function that returned any date component asked for. I’m just thinking out load here but something like:
    Function name: GETDATE(date, X)
    Parameter1: date : the date/time object to extract a date component from.
    Parameter2: X : a letter that represents a component of the date/time object. For simplicity I think using the letter codes from the “Date Field Symbol Code table in the http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns document that is the reference for the existing DATE function. Maybe not all the codes, but I would like to see,
    ERA (G), Year (y,Y), Quarter (Q), Month (M), Week (w,W), Day (d,D,F), Weekday (e,E), Period (a), Hour (h,H), Minute (m), Second (s), Zone (z,Z,O,v)
    Example usage: (Note that the day I posted this it is Wednesday, November 22, 2017)
    Get the current year in full format, GETDATE(TODAY(),"yyyy") would return 2017 as an integer.
    Get the current, localized, day of the week in two letter format, GETDATE(TODAY(),"eeeeee") would return WE as a string. It would seem this would be redundant with DATE(TODAY(), "eeeeee") but it doesn’t work, I am guessing the date parser is not currently implemented for all the unicode date symbols.
    Get the current localized weekday as a number, GETDATE(TODAY(),"e") would return 3 as an integer.
    Get the current day of week in the month as a number, GETDATE(TODAY(),"F") would return 4 as an integer because today is the fourth Wednesday in November.
    These examples are all with TODAY() as the date to get components from but the date parameter could be any date field in the form and give the user flexibility to extract whatever they needed for whatever there reason is. Very general purpose and would provide the functionality to get the DATE(date, "yyyy-mm-ss") components as numbers and much much more.

    I reply to your question about specifying date 3 months into the future, as I understood the function Brendan was proposing, DATEADD(Date, Y, M, W, D, H, M, S) a person was the flexibility to get any of those results you suggested. For example, averaging month to 30 day so 90 days into the future from today would be DATEADD(TODAY(), 0, 0, 0, 90, 0, 0, 0) but if we want three months paying attention to the number of days in each of the next three months then DATEADD(TODAY(), Y, 3, W, D, H, M, S) would do it. I think the function Brendan proposed (as I understood it) is actually really quite flexible in deriving future dates from today or any other date field.

    It was real late last night when I posted that reply to Brendan and proposed as a thought-experiment a function with the same name as an existing function and that was negligent of me. So I will revisit that idea now. In nearly all the date functions in TapForm a date is expected as one of the input parameters. This date could be provided by the NOW() or TODAY() function of be a reference to a date field. I propose a function that allows an arbitrary date to created. This arbitrary date could be used to auto-fill a field with a hard-coded date or be a hard-code date to start or end a duration function on, for example.
    Function name: SETDATE(G, Y, M, D, h, m, s, p, z) and it would return a date/time object that probably internally an NSDate.
    Parameter1: G : the ERA : would default to AD.
    Parameter2: Y : the year
    Parameter3: M : the month
    Parameter4: D : the day
    Parameter5: h : the hour
    Parameter6: m : the minute
    Parameter7: s : the second
    Parameter8: p : the period (auto sets if the hour is greater than 12)
    Parameter9: z : the zone and default to the local zone

    I’ve got some errands to run but will give some examples and revisit my DAYDATE function later.

    ~Chris

    November 22, 2017 at 5:14 PM #26066

    Chris Knight
    Participant

    Hi Brendan,

    Looks like we cross posted just now. The more I think about the DATEADD function you proposed (and finished? Wow! awesome! :) ) the more I like it the way you proposed it. Yeah its a lot of parameters but its not like I am going to keep editing them once I get the calculation doing what I want on form layout.

    Really happy to year that DAYDATE() might work out. I think it would be a useful general purpose date function for those questions that are hard to answer without being able to work with the day of the week.

    ~Chris

    November 22, 2017 at 9:58 PM #26073

    Brendan
    Keymaster

    I propose NEWDATE(E,Y,M,WY,WD,WO,D,H,M,S) as a grand all encompassing way of creating dates of many different types.

    E = era
    Y = year
    M = month
    WY = week of year
    WD = weekday
    WO = weekday ordinal (e.g. 2nd Wednesday if WD = 4 (Wednesday))
    D = day
    H = hour
    M = minute
    S = second

    Although I really don’t know why anyone would want Era.

    Plus another, more simplistic DATEVALUE("11-22-2017", "MM-dd-YYYY")

    You could type in any text date or get the text date from a field. As long as you provide the pattern, Tap Forms will know how to parse the date string provided.

    Just an idea.

    November 23, 2017 at 12:24 AM #26075

    Chris Knight
    Participant

    Okay so resuming where I left off…

    As I was running my errands I was thinking about the time part of SETDATE() and thought maybe all the time values should have a default to perhaps midnight so can be left out of the function if the time is not important for the use case.
    Examples of SETDATE() usage.
    1) Find the number of days between now and Christmas of this year without a date field on the form that has to has the date for Christmas entered every time a new record is created. DAYS(TODAY(),SETDATE(,2017,12,25,,,,,)) returns 33 as an integer. The ERA defaults to AD and the time defaults to midnight and the time zone defaults the the local (as set in the system preferences). Every time a new record is created the calculated field on the form auto-populates with the countdown to Christmas.
    2) The other day someone asked how to get the count of days until the end of the month. How do we find the end of the month and put it in a duration function? What if we nest proposed functions? DAYS(TODAY(),SETDATE(,GETDATE(TODAY(),"YYYY"),GETDATE(TODAY(),"M")+1,1,,,,,) returns 8 as and integer.

    Function name: DAYDATE(N, D, M, Y) returns a date/time.
    The time is defaulted to midnight and the timezone defaulted to local and the ERA defaulted to AD.
    Parameter1: N : is 1-5 is the number of “days of the week” into a month and obviously 4 and 5 might not always return a date if that month didn’t have that many.
    Parameter2: D : is 1-7 for the day of the week, where 1 is Monday (as per Unicode standard),
    Parameter3: M : is 1-12 the month
    Parameter4: Y : is the year
    Example usage:
    1) Find the date for Thanksgiving next year. DAYDATE(3,4,11,2018) returns a date displayed as per the date format selection of the calculation field, 11/22/2018

    As I am writing this I am thinking that maybe this function could be even more generally useful with some tweaking. Here is another approach to the same basic function,Function name: DAYDATE(N, D, M, Y) returns a date/time.
    The time is defaulted to midnight and the timezone defaulted to local and the ERA defaulted to AD.
    Parameter1: N : is 0-6 for the number of “days of the week” into a month where 0 means the first day of the month and 6 means the last day of the month.
    Parameter2: D : is 0-7 for the day of the week, where 1 is Monday (as per Unicode standard) and zero means ignore the day of the week.
    Parameter3: M : is 0-12 the month, where 0 is current month and 0+1 is next month (current month plus one)
    Parameter4: Y : 0-YYYY is the year and if zero default to current year and 0+3 is in three years (current year plus three)

    So revisiting the second example above of the SETDATE() function we could answer the posters question with DAYS(TODAY(),DAYDATE(0,0,0+1,0)) returns 8 as an integer. Shorter and simply way to answer the poster’s question.

    Continuing this train of though, How many days until the end of the year?
    DAYS(TODAY(),DAYDATE(6,0,12,0))

    Anyway, these are just idea tossed out there that would help solve some of the barriers I’ve run into with trying to adapt TapForms to my uses.

    ~Chris

    November 23, 2017 at 12:40 AM #26076

    Brendan
    Keymaster

    Still reading your post, but I’ve also just added an EOMONTH(Date) function to return the end of the month for the specified date. That, combined with DATEADD() (e.g. EOMONTH(DATEADD(Date,0,1,0,0,0,0,0,)) ) will get you the end of month from any date in the future (or past).

    November 23, 2017 at 12:43 AM #26077

    Brendan
    Keymaster

    I could also allow the EOMONTH() function to take 2 parameters as it does in Numbers. The first parameter is the Date and the 2nd parameter is the number of months from that date. Negative numbers are in the past. So essentially I’d be doing the DATEADD() part for you, but behind the scenes. So the function could be EOMONTH(Date, 0) to get the end of the current month and EOMONTH(Date, 3) to get the end of the month 3 months from Date.

    November 23, 2017 at 12:51 AM #26078

    Brendan
    Keymaster

    Look at this documentation for NSCalendar as this is what I have to work with for computing dates. It’s very flexible:

    https://developer.apple.com/documentation/foundation/nscalendar?language=objc

    and NSDateComponents which are the individual components I have to work with for dates:

    https://developer.apple.com/documentation/foundation/nsdatecomponents?language=objc

    Again, very flexible but if I implement everything in there, it’s probably overkill for general usage.

    November 23, 2017 at 1:41 AM #26079

    Brendan
    Keymaster

    How many days until the end of the month, 2 months from now:

    DAYS(TODAY(); EOMONTH(TODAY() , 2))

    How many days until Christmas:

    DAYS(TODAY(); DATEVALUE("2017-12-25", "yyyy-MM-dd"))

    November 23, 2017 at 1:45 AM #26080

    Brendan
    Keymaster

    By the way, the empty parameters suggestion you have there doesn’t seem to work with the math parser I’m using. So at the very minimum just put 0’s in those spots instead of commas.

    And I didn’t want to use SETDATE as a name because to me that feels like you’re setting a variable or setting a date value, but really you’re getting a date value from some parameters.

    November 24, 2017 at 5:02 AM #26114

    Jose Monteiro
    Participant

    Hi Chris,

    Have you accepted Brendan’s invitation to join his Beta Team?

    It would be great to have you with us.

    Jose

    November 24, 2017 at 5:02 PM #26118

    Chris Knight
    Participant

    Hi Brenden,

    I was away from my computer yesterday and will be most of today except for random moments. I haven’t any attachment to any particular function name myself. As long as there is something somewhere that explains what a function does, its return values and parameters then I am all good. I do prefer shorter to type in than longer names (str2int() instead of sting_to_integer(), but whatever.

    Zeros are easy to type, I see no problem there, except maybe for the year 0 if there is someone doing historical work in the astronomical, Buddhist or Hindu calendars and needs/wants to record an event in the year zero. For all of us in the Gregorian calendar (or even Julian) there isn’t a year zero so no problem there for historians using TapForms.

    I like the EOMONTH() with two parameters and the NEWDATE() and DATEVALUE() functions as you’ve proposed them. And with the DATEADD() they solve a very wide range of possible use cases really extending TapForms ability to work with date data. I like it lot.

    I don’t actually think most people would want or care about ERA. My wife’s university studies involved a lot of old texts and the dates of source material is important. When she was a student she would have cared, but as an English teach that isn’t the kind of information she records in a database anymore. I would surmise that historians would care about ERA. So would archeologists, anthropologists and linguists depending on what they are studying. Students of these disciplines will have to deal with ERA sometimes as well. Whether or not they are organized enough and have the insight to put TapForms to work for them doing in their research and note taking. I suggested ERA only to make TapForms barrier-free for those people who might need it.

    I briefly looked as the NSCalendar document you linked to and what jumped out immediately to me is the comparison options. I have not worked yet with TapForm 5 IF() but had found it very lacking in what I have wanted to do when I first moved to TapForms from Bento. Being able to auto-populate a field based on some logic or do some sort of entry validation based on logic really needs a good basic set of comparison operators and at least an IF() that is reasonably flexible with what it can do. In terms of date functions, since that is what we’ve been talking about, being able to test if a date is before, after or the same as another date and then be able to something would require ideally a case statement or at least a nestable if statement. I have not yet experimented with iIF(), ISEMPTY(), ISNOTEMPTY() or the logic operators in TapForms5 so I’ve no idea what their limitations are currently. I plan to do this as soon as I finish tweaking my current project form layout and figure a way to extract the data from a Circus Ponies Notebook export and get it into a form that I can import into my new TapForms form. My next project is going to revist one I had to give up on in TapForm 3.x due to limitations on table linking and then after that see if I can’t tweak the forms my wife use daily in her work to be more like the Bento from she used to use but lost some functionality moving to tapForms a couple years ago.

    Also the ability to link up with Apple’s calendar(s) is interesting to me. I have a lot of data in multiple calendars that I have to input into the form I just designed but how I might go about wanting to link that up I have not given thought to yet. Reducing data input would certainly be nice. Searching one of more calendars for data mining would be nice too. After I get my other TapForm projects done I might revisit this idea and define just what my requirements and use case could/would be and then try to figure out how TapForms can or should be able to achieve it.

    Hi Jose,
    I didn’t know that I had been invited. I had to look back at what I recently posted and see I forgot to subscribe to your original thread so I missed it. I will accept it but I don’t know if I would be the ideal candidate.

    ~Chris

    November 24, 2017 at 11:50 PM #26120

    Brendan
    Keymaster

    Hi Chris,

    Let me know what email address you want me to use to give you access to my Dropbox folder where I keep the betas and what address I can send the TestFlight invitation to. Since you have a lot of good ideas about all the date functions, I would love to get your feedback on whether how I’ve implemented them are suitable to your needs. I can just use the email address registered with your forum account if that suffices.

    As for the IF() function, it’s more of a math expression builder than a programming syntax like what would be required to support populating other fields based on various conditions or doing various actions in Tap Forms. That is something that would be useful in the long run though. Just not sure what language would be the right thing to implement.

    November 27, 2017 at 2:07 AM #26172

    Chris Knight
    Participant

    I bet Apple would say Swift. I have not used it myself yet. When it was first released I started to read up on it but decided it needed to have more time before I was going to learn it and see if the promise of cross-platform programming actually went anywhere.

    I would personally vote for a subset of Python that includes only what would be applicable and useful in TapForms. There are slimmed down versions that are pretty small like MicroPython but it is aimed at embedded development on micro controllers. But, Python is probably the easiest language I ever learned to actually get doing useful things with quickly, even if the Python fan community is pretty vocally opinionated. It can be embedded in applications as a scripting language https://docs.python.org/3.6/extending/embedding.html and it can be slimmed way way down to a single 11MB file, https://www.egenix.com/products/python/PyRun/ . Actually, it can be even smaller by taking out a lot of the stuff that wouldn’t be needed. I’ve seen a python fit in 64k. Yep, 64k !!! Because micro controllers don’t usually have a lot of memory on chip it is important in that environment to make it small. MicroPython is current and needs a whopping 256k. That still isn’t a lot of memory for everything it can do.

    The idea of having a “real” interpreted scripting language to manipulate field data with is pretty super dreamy cool. Especially conditional decision making statements. But there are plenty of other things I find more pressing for myself. Field properties for example.

    November 27, 2017 at 2:17 AM #26173

    Jose Monteiro
    Participant

    Would be great to have Python here.

    Jose

Viewing 21 reply threads

You must be logged in to reply to this topic.