Confiform syntax for conditional to validate two fields in a record

kowshick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2024

HI, 

I am making a room booking calendar using confi form

I have three confiform field definition . One is of Text input, One is of data type interval of field name "eventDT" and other is dropdown of field name "RoomName".

 

Every time I make a new a new entry [Name, Datetime, SetupName] I want to check when the database already has an entry in that Datetime interval for a specific RoomName. 

Below is the condition I have in the rules for field definition, however it doesn't seem to work fine. The datatimeinteval check alone works fine, but RoomName is always false?

(eventDT.startDate:<=[entry.eventDT.endDate] AND eventDT.endDate:>=[entry.eventDT.startDate] AND RoomName.id:[entry.RoomName.id] AND !id:[entry.id])

 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 27, 2024

What is not working for you with this expression?

I have tested with yours and a bit simplified and it works just fine and find the overlaps

(eventDT.startDate:<=[entry.eventDT.endDate] AND eventDT.endDate:>=[entry.eventDT.startDate] AND RoomName:[entry.RoomName] AND !id:[entry.id])

 Obviously, the validation rule has to be set to be across the "dataset" - Validation rule (dataset)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events