Hi Alex,
I have an existing filter in my confluence calendar that limits the number entries on any given day
What I'd like to do is allow an additional entry (go from 2 to 3) for a given month or period, say Mar and Apr (but only during this time) - how do I go about specifying that in the condition filter?
Thanks
Jonathan
Hi
What filtering condition do you have at the moment?
Alex
Hi Alex,
It's a condition you helped me with previously:
(Date:[entry.Date] AND ChangeControl:true AND !id:[empty] AND _count:>=1) OR (Date:[entry.Date] AND ChangeControl:false AND _count:>2) OR (Date:[entry.Date] AND _count:>2) OR ((Date:[entry.Date] AND _count:>1) AND (ChangeControl:true AND _count:>0))
J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cannot remember, sorry - too many conversations :-)
The idea would be to add use of formatDate with specific pattern from https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions
Basically checking the "month" in addition
Date.formatDate(M):3
(3 goes for March, 4 for April, according to docs)
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry Alex I'm struggling here; I can't work out who to add the (
Date.formatDate(M):3
) so that it checks the month being selected is "3" and then allows 3 entries as opposed to 2.
Any help or examples would be appreciated
Thanks
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You add where you need to check that - I mean, you know the requirement better
I am not sure I remember you exact requirements.. but basically
(Date:[entry.Date] AND Date.formatDate(M):3 AND _count:>3) OR (Date:[entry.Date] AND !Date.formatDate(M):3 AND _count:>2)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That looks great - do I add that as a new rules for field definition with its own condition filter or just append it onto the current filter?
Thanks again
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alex, got it to work - it's a combination of editing the two different condition filters and adding the relevant values from your example above where necessary.
Appreciate the support as always.
J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I have not provided an exact filtering condition (lack of time) - but I am glad you have figured it out yourself.
I would also do it in a way that I have multiple validation rules that validate the record for certain conditions. Easier to understand and maintain later
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
Could you help me with the syntax in this filter please. I want to extend the option to multiple months. The query that works for one month looks like this:
(Date:[entry.Date] AND Date.formatDate(M):3 AND _count:>3) OR (Date:[entry.Date] AND !Date.formatDate(M):3 AND _count:>2)
I tried creating a separate rule field definition for each month and specifying the relevant number (M):x but that doesn't work.
I also tried adding an additional
AND Date.formatDate(M):x
but I'm not sure I have the syntax correct so it's not working either.
Any help would be appreciated.
Thanks
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I came up with something like this
(to allow 3 records per day in March/April) and only 2 per day on other months
((Date.formatDate(M):3 OR Date.formatDate(M):4) AND (Date:[entry.Date] AND _count:>3)) OR (Date:[entry.Date] AND !Date.formatDate(M):3 AND !Date.formatDate(M):4 AND _count:>2)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Alex Medved _ConfiForms_
Could you help to add condition which will accept only dates which are from the current and upcoming years? The past years shloud be not allowed
I tried a lot of rules :/
[formatDate(entry.AllocationStart, "yyyy")] < [formatDate(today, "yyyy")] OR [entry.endDate] < [entry._today]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Condition for the validation rule would be something like this (assuming your field to check is named "date")
date.formatDate(yyyy):<[entry._now.formatDate(yyyy)]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need to validate the field that is added while filling the form (from the dropdown).
And then, if someone decides to select an option from a dropdown, I'm adding a new field, but this field cannot be empty. It must be filled whenever someone chooses the option 'No' from my dropdown and is trying to submit the form...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I dont understand your comment/requirements
What you want to validate and when?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
mydropdown:somevalue AND myfield:[empty]
Meaning when the mydropdown has somevalue the field should NOT be empty
For the validation rule you describe the "error condition", in other words - when the validation should trigger (when something is "wrong" and you describe that with a condition)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With added screenshots, changing the condition for the validation rule to be
FTEAdjustment:2 AND FTEFlat:[empty]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.