Date field validation: greater than previous record
I have a date field, where the date input must be greater than the previous date record.
I tried this, without success: Date > Last (Date)
This one works: Date > Get (CurrentDate)
i propose to create a summary field to get the maximum of date field, than add you condition Date > new defined field it should work even on an other table.
What identifies the "previous record"? This might be the record immediately previous to it in the current found set or it might be the record with the most recent date over all records that exist in the table. Other scenarios are also possible.
Describe what you mean by "previous" and we can take a better attempt at how to validate your date.
I have a one to many relationship between table A and table B. In table B are the dates stored. So with previous I mean the last related record.
I created a calculation field (c.maxdate) with Max (date) with "no saving" and put it in the portal row. As validation of the field "date", i put date > c.maxdate, but it doesn't work (previous dates can be entered). When I put the field outside the Portal row (in the layout of Table A), it shows me the oldest related date.
Thank you very much! I solved the problem. Instead of creating a calculation field, I had to create a summary field to get the Maximum and then add the condition Date > new defined field as described by "younes Deffous".
Last ( relatedTable::Date )
Returns the date from the last related record.
Max ( RelatedTable::Date ) evaluated from the context of your parent table, will return the same value as your summary field. No need to change what you have, just pointing out another option.
Retrieving data ...