Date functions - is before, is after, is between

I’m trying to have a component show or hide dependent on whether a particular date field’s value is at least 15 days ago.

I’ve tried "DATE is before ‘2 weeks ago’ ", and it didn’t work. So I thought maybe I’m reading it wrong. I tried "DATE is after ‘2 weeks ago’ " but it still isn’t working.

I don’t want to start making changes to my database structure cos I’d have to start going through all the pages to change how things happen.

Am I using those date comparisons wrongly?

Can you share some screenshots of the the setup of that component and also an example record of that collection.

I spent all night on it, and I’ve kind of solved my problem in a roundabout way. When I wake up properly, I’ll try to see if I can show what I was going through. Haven’t slept. Please gimme a little time.

Screen Shot 2020-11-04 at 7.17.51 PM

I wanted the WITHDRAW button to show only if the Start Date (DATE CONFIRMED) is at least 15 days ago.

I couldn’t use the date functions mentioned in my original post to achieve that condition, so I had to use text input fields to calculate the number of days the investment has been running, the days between that are Saturdays or Sundays (I have a table where I have recorded all weekend dates since September) then I can use the number of week days only for my calculations.

I’m trying to make sure an investor who has withdrawn can’t withdraw again till another 15 days have passed (as per the brief I got). It would be so much easier if I could just tell the Adalo system to “do this” if “date” is greater than 15 days ago, or some such clause.

I also notice that the visibility rules are sort of limiting when dealing with text input fields. If I get a number calculated from values in the database displayed in a text field, I want to create a condition based on that number being greater or less than something, but the only options I get are ‘equal to’, ‘not equal to’, or ‘contains’.

These are some of the issues I’m facing trying to deliver an app with Adalo. Hope my explanations are clear enough.

I also notice that the visibility rules are sort of limiting when dealing with text input fields. If I get a number calculated from values in the database displayed in a text field, I want to create a condition based on that number being greater or less than something, but the only options I get are ‘equal to’, ‘not equal to’, or ‘contains’.

These options are specific for “number” properties in a collection and cannot be applied to a text string. This is a technical limitation that is hard to avoid.

So even if I set the field to a number type, it won’t give me the options I need. That’ll mean creating records for values I don’t really need records for, which I believe will be a waste of memory.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.