comparing date for custom validation
-
Hi, I want create a custom validations of a date field if is greater or equal to the value of other date field but seems I cannot do that because I don’t see any formula icon to make this validation.
Can you help me please?
Best regards
-
Do you want to check if a date field is bigger than another date field? If so i think what you want to do is using the max and minimum date settings with formulas like this: https://allinoneforms.rednao.com/using-formulas-in-field-settings/
If you still want to do validations with formulas you can do so, the conditional logic also support formulas, there should be a calculator icon that you can click to add a formula in a conditional logic.
Hi, I don’t see any calculator icon in date field to create custom validation by comparimg the date to other date field. For this I asked.
Oh sorry the date fields didn’t have that feature. Please update you will be able to add formulas in date conditions in the latest version.
Regards!
Ok, thanks a lot!
Best regards
Hi, I use the last version but I don’t see the icon on condition to compare (equal, grater…) 2 date fields.
I don’t see the same in filter settings in lookup field. For example I want lookup field show only some items filtering them if the date of period insert in field date A is included between 2 date fields of validity of the item.
Err sorry probably i didn’t understand but the date field seems to have the greater or equal than condition
View post on imgur.com
Hi,yes I know but the problem is that I cannot set as TO another date field. I need to set (date) field A greater or equal than (date) field B to compare the dates of these fields.
I hope it’s clear.
Best regards
Are date a and date b part of the remote form? (the form which the plugin is querying)? If so unfortunately that is not possible you can only query using either fixed values or dynamic values that are coming from the form that the user is filling.
If you know this kind of information when the user is submitting the form though you might be able to create a hidden field with a formula and use that in the look up field.
So for example, if you have a “Form a” with two dates and you in “form b” want to add a look up field which retrieve only the records where the date a is bigger than date b you could add a hidden field in “Form a” which use a formula to save a 1 or a 0 if the date is bigger or not and then in the look up field use this hidden field to query the wanted records.
Regards!
-
This reply was modified 3 years, 1 month ago by
EDGARROJAS.
Hi, both date fields are in the same form, no remote. Neither in this way I can compare like I told you.
Err sorry i am still confused on what you want to do, initially in this thread you mentioned that you wanted to create a custom validation but then it seems that you want to include this in the lookup fields but it seems both dates are part of the local form and you don’t need to use the remote form
Could you please detail (if possible with a screenshot) what and where you want to do this to better provide you support?
If all you want is to send a date field to a lookup filter you can use the calculator icon (please check the previous screenshot that I sent to see what calculator icon I am referring to) and then select the date field in the form to send the value of the date field to the remote filter.
Regards!
Hi, never I talk about lookup field. Simply I want enable a custom validation in a date field where I make it invalid if its date is greater of date of field B. How can I do?
Oh my bad, you mention the lookup fields and probably i got confused or maybe i miss understood all together. Sorry for that.
If you want to use the value of a date to validate another date in a custom validation you can click in the calculator icon and then in the formula builder add the date field, here is an example of a custom validation that validates that the date 1 is greater than the date 2
Hi. This is what I did exactly but when I click on the calculator icon and click on field button to set the other date field I don’t see this field in the list proposed to select.
Oh, is the datepicker inside a field container like a repeater or group panel field?
Hi, these date fields are inside the repeater.
-
This reply was modified 3 years, 1 month ago by
The topic ‘comparing date for custom validation’ is closed to new replies.