General Discussion

  • 1.  Struggling with Date Questions

    Adopter
    Posted 02-14-2025 16:19

    Hello!

    I am struggling with entering dates and the conditional logic in this difficult scenario. 

    In a repeatable section, I am trying to make sure you can enter a 'tool used date' that is the same date or prior date as the 'calibration due date'. The issue I am running into is using the Date Selector question, you can only use past or future date-but past does not allow us to use the current date. In most cases we will be using the current date, but the past date could be used.

     

    I tried to add a question for 'tool used today' with yes/no answers. Where 'yes' would date stamped todays date in a Date Stamp question, and 'no' would allow to enter a date in the past in a Date Selector question.

      

    Then a string concatenate question the two dates (either the Date Stamp question or the Date Selector question) into one field so only one date will display with no blank fields in the table. However, if we have multiple tools, where one date is in the past and one is today, the string concatenation displays both dates.

     

     

     

    In the repeatable section, I also compare the 'calibration date' and 'tool used date', to ensure we are compliant and not using overdue tools. (this is the 3 bottom questions in the image above, 'Tools Completed' 'Total Tools' and 'TestPercentageTools') The conditional logic (in the image below) provides a count if there is a row, that all information is entered and a count if the 'tool used date' is equal to or prior to the 'calibration due date'.

     

     

     

      

     

    Requirements: All the questions need to be answered, 'tool used date' has to be same or before the calibration used date, and have no blank fields. I have this in a repeatable section because we could have multiple tools depending on the instrument selected, and for tools to be added or removed on the fly. Tools are brought into the form via a Schema.

     

    Is there another way to solve this issue inside the repeatable table? Maybe I am going about this the wrong way, making it more complicated than it should be! 

    Thank in advance for any assistance! 



    ------------------------------
    Andrea Jones
    Application Analyst
    Exact Sciences
    WI
    ------------------------------


  • 2.  RE: Struggling with Date Questions

    Posted 02-18-2025 16:02

    Hello Andrea,

    A lot to unpack here. I have worked with Calibration Equipment quite a bit before and in those cases, we were always looking to see if the tool was "allowed" to be used and if the Calibration Due Date was in the past (prior to the form being launched) we would essentially block them or force them to make some comments as to why, so this is interesting to come at it from the other way around.

    I think that you are so close with your solution!! For your Date/Time question that you are capturing "Today's Date", is that a Stamp or a Selection with a default added to it? I am going to assume that it is Stamp which is why you are ending up with 2 dates in your Concatenation question.

    If you flip that "Today's Date" question to be a Date/Time Selection and then on the Properties use the "Page Start" as your default, and then update your conditional logic rule that is controlling the "Tool Used Today" piece. This would allow you to clear either Today's Date or Date Tool is Used so that you will only get the 1 date in your concatenation question.

    Let me know if that helps you, I think there are a dozen different ways to approach this and I think you are going down the right path.

    Thank you




    ------------------------------
    Ian Chamberlain
    Solutions Architect
    TrueContext
    ------------------------------



Reminder: Content posted to our Community is public content.  Please be careful not to post Intellectual Property that you do not have permission to share.  For more information please refer to our Terms Of Use