Custom filter

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Tue May 07, 2019 7:09 pm
Hi,

I'm trying to add multiple fields to the custom filter in the "Load Calendar settings..." script.

My Current code is

GetFieldName ( Appel_Service::A_EndroitTravaux_Nom )
& ¶ &
GetFieldName ( ToDoList::Summary )


it says to add more fields, just add the P return, so I change the code to

GetFieldName ( Appel_Service::A_EndroitTravaux_Nom )
& ¶ &
GetFieldName ( Appel_Service::A_EndroitTravaux_Adresse )
& ¶ &
GetFieldName ( ToDoList::Summary )


The 1st field is my event name and the 2nd is the address.
Save the script, run the saved script "Load Calendar settings ..."

Nothing shows up in the calendar that matches the find criteria. Before I add this line to the code, it will find any event with the search criteria in the event's name. After that change, event the event name doesn't work.

So by adding this line, the basic search filter fail, remove the 2nd field, works OK. I don't use the ToDoList, so I can't test if it finds result in that field.

I remove the ToDoList field to see if it was limited to 2 fields, same results.

Both fields are plain text fields, indexed.

Any idea how to fix this ? Thanks
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Tue May 07, 2019 8:54 pm
Hi jffortier,

Each of those set variable steps should only refer to one field for each table. The value that is set to "CalendarInterface::FilterGlob_X" will be compared against the field(s) you specify in $$sc_FilterField[X] that matches the table.

So in your case, the value that you specify in the filter field you specified needs to match both the Appel_Service::A_EndroitTravaux_Nom AND Appel_Service::A_EndroitTravaux_Adresse field values in order to return any results (which it most likely does not).

If you want to be able to search for separate values on both the Nom and Adresse fields, you'll need to specify each of those fields in a different "$$sc_FilterField[X]" variable and have a matching "CalendarInterface::FilterGlob_X" field that allows the user to specify the value they would like to search for.

I hope that makes sense. Let me know if you have any further questions.

Regards,

KC
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Wed May 08, 2019 5:04 pm
Thanks, That's what I ended up doing, but it's more "user friendly" to have one field to make an universel search by text, just like the QuickFind.
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Wed May 08, 2019 10:04 pm
Hi jffortier,

Great to hear you were able to figure that out.

DayBack does include more of a "universal" text search that can be used to search through all of the fields in the event data, along with more advanced operator searches as detailed in our documentation here: https://www.seedcode.com/pmwiki/index.p ... terOptions

You can find the text filter in the filters sidebar of the calendar.

I hope that helps!

KC
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Fri May 10, 2019 5:20 pm
Yes, I recall this.

I turned off the filter’s tab, as it was not working for my application.

My events have 2 fields: Type of event AND Status, colour is set by Type and Status will switch from a dark colour to the same colour but lighter.

And it was required to create for each of the combination a colour and status name, I have too many that user will need to scroll up and down that to works.

I hard coded in the CSS the event colour based on a calculation.

I think a solution that could make a similar effect would benefit many DayBack users (Read "request" here :lol: )

In my case it's
Event Type: Service Calls, Maintenance, Installation...
Status is: Active or Completed

A quick visual look at the calendar and you could see what is still active or not.

I thought of a check icon when complete, but when you have multiple resources with many events, each event is too small to see all that info, but colour is easy to see.
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Mon May 13, 2019 8:26 am
Hi jffortier,

Thanks for the details on that. Yes, when using CSS to override the status color of the events, then the built-in Status filters aren't going to be as useful. If you'd like to give your users access to just the text and resource filters in the filters tab, you can remove the CSS that you added to hide the Filters tab and add this to hide just the "Status Filters" section:

.filters-status {
display: none;
}

I hope that helps!

KC

Return to DayBack Calendar for FileMaker

Who is online

Users browsing this forum: No registered users and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: