Forum Discussion

MichaelSamo's avatar
MichaelSamo
Qrew Trainee
5 years ago

Checking dates and comparing fields

I am having trouble trying to use the dates field in a scheduler app and then check a different field in my form to see if it is the same the as the day before and after. If the fields are the same/open/null then it would allow the request to go through, otherwise it would prevent the scheduling because of the secondary field. Is it possible to do this on the quickbase platform?
  • Yes, easily done, but can you express more clearly the logic that you want to have and we can help you with the formula syntax.

    For example, if we make a formula checkbox field called called [OK to Allow Request] we then need to list the conditions and if they would make the checkbox checked or unchecked.  We also need to understand if the day before is calendar days or business days.

    IF(
    [date field 1]=[date field 2], true,
    [date field 1]= [date field 2]- days(1), true ).

    etc.. need to have you say your complete logic listed by each test that needs to be done in the sequence they need to be done..

     



    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MichaelSamo's avatar
      MichaelSamo
      Qrew Trainee
      Okay I follow and thank you for the response

      My current logic is to check if the day before and after is scheduled for a product, if said product is the same(or empty) as the day before/after then there would be no issue with the system and the request can go through. If the product is different then I'd want to display a message that the product on the day before/after is different and a new date must be selected. Ideally I'd like to limit this to business days with Monday not being a possible option throwing a "setup day" to the user and limiting the total products a week to three days e.g. Tues with Product A and Thurs/Fri with Product B and Tues-Thurs with Product C are both viable outcomes

      Please let me know if I need to clarify on my logic

      ------------------------------
      Michael Samo
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Are all these dates on a single record or across multiple different records?

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------