Dynamic Menu Population Filter Errors out stating The query is invalid
Need to filter out the list of values from a Data table via Dynamic Menu Population field based on the Inactivated Date which is a new column added in the Existing Data table.
Requirement: To not to display the rows having Inactivated Date beyond the current Date. In order to compare we tried the below code, but it errors out.
code1 tried: {$toDate:"$InactivatedDate": {$gt:$toISODate(currentDate)}}
code2 tried: InactivatedDate: {
$dateFromString: {
dateString: "$InactivatedDate",
format: "%Y-%m-%dT%",
}
}
({
[dateString: { $gt: $toISODate(currentDate)}
]})
Question: In Data table we don't have a date field type. So added a new column of string type. we also tried converting the string to date value, but it error stating as below "The query is invalid. See Online Help for more information on MongoDB query syntax".