Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Compare Date in ConfiForms

Martin May 27, 2021

Hello everyone,

I created two forms in ConfiForms. In one there are three fields: Place, Time and Date. In the other form I have a SmartClassifier field which accesses the fields.

Now on another page I have a ListView in which I display the date using SmartClassifierField.Date. On the same page there is an Edit Control with which I can change the values.

Now I want to hide the edit control via "Hide controls when stored data (for given record) matches this criteria" if the date is 72h away from today. I have done this with:

 SmartClassifierField.Date:>([entry._today]-3)

but the "-3" is ignored even if I change the value.


I also tried with

SmartClassifierField.Date:>([today]-3) 

but that didn't work at all.

 

Can someone tell me what I am doing wrong?

Thanks in advance
Martin

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
May 27, 2021

Hi

Looking at 

SmartClassifierField.Date:>([today]-3)

I have to say that it should work.. but may be the issue is that it is accessed through the smart field and not directly available in the current form

I suggest to work on timestamps in this case

 SmartClassifierField.Date.timestamp:>([entry._today.add(-259200000)])

What is "259 200 000"? It is 3* milliseconds per day (86400000)

Alex

Franz May 8, 2024

By the way - how to regain controls to edit again if (in some cases) changes are still requested but the buttons are invisible - do I need to remove the validation rule from "Edit Controls for ConfiForms"?

Alex Medved _ConfiForms_
Community Champion
May 8, 2024

This is about hiding the edit controls in a particular view

You can use the form's default admin UI to edit records or create another view with Edit Controls that dont have this logic

Like Franz likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events