Forum Documentation Showcase Pricing Learn more

Notification Button

Hi all,

Trying to tie in a form of notification to Admins on my system but struggling a little bit! Attempting to make the highlighted circle appear RED when a Users MOT date is less than the current date, can anyone see where I’m going wrong? I can get the search nailed down but it won’t let me add the When Condition!

Please help, the system itself is nearly complete and it’s one of the last things I’m struggling with!

A when condition has to be yes or no. So if you want to check if there are any StaffVehicles which meet the conditions, you should add :count >0

cheers!

Hi!

While this works, when the conditions aren’t met, the circle still becomes red, am I doing something wrong?

Can you give me some more info about your data structure? Does one user just have one VehicleMOT or?

Each entry has it’s own MOT value, idea being that an admin can see from the dashboard view if MOT is due by looking at the icon whether it has a red circle or not, in short yes one user has one VehicleMOT.

image

I think you should use CurrentUser’VehicleMOT>currentDate as a condition if I understand your structure. Which entry do you mean?

Ah, this data structure isn’t for “User”, it’s a different one called “StaffVehicles” But yes it would be VehicleMOT.

So a user has multiple StaffVehicles?

And you would like to check if at least one of those StaffVehicles’VehicleMot> current date?

Sorry my explanation was bad!

The only part that comes from my User database is the username of that User.

Everything else vehicle related is inside “StaffVehicles”. So there would be multiple StaffVehicles with data.

Yes, I would like to check if anyones MOT date is less than the current date in order for the red dot to appear for action to be taken.

And how are StaffVehicles and Users connected? Through the field VehicleStaff?

Your conditions here say if there are one or more vehicles with an MOT that is AFTER the current date/time, make the background red.

In your search parameter, change the > to a < and that will change the condition to only make the background red if one or more vehicles has an MOT that is BEFORE the current date/time.

They are connected through the field “Username” and that’s all.

Eli sorry I got it the wrong way around, it needs to appear Red when the MOT is due or overdue so on the day or after the day until it’s changed by the local admin.

So StaffVehicle has a field username? I think you should at that condition in your dosearch: Vehiclestaff’Username == User’s Name

MOT > current date/time will show red if the MOT due date is tomorrow or after (the next day or the next day etc)
MOT ≤ current date/time will show red if the MOT due date was today or before today