Calendar categories and group of users


I created a calendar and edited the categories for custom titles. I now have 10 categories on the calendar that exactly match 10 different groups that I use in the security module.

Using a single calendar, how do I indicate which categories in the calendar each group of users will be able to view and/or edit?




Could someone help me with this issue?



Create a table that contain the following field

ID, CategoryName, Color, GroupID

In the calendar category use the automatic lookup method

SELECT ID, CategoryName, Color FROM Table WHERE GroupID = [GroupID]

Adjust the WHERE clause to match your need


Thanks for your help. I made the code run properly following your instructions.

However, now I need to make some changes on the code. Let’s imagine we have several categories in column GroupID

for example:


Now, if an user has a global variable [GroupID] equals to abd, I would like to have the user having access to categories a, b and d only. Not c, e and f.

I tried:

WHERE GroupID LIKE '%[GroupID]%'

But it is not showing any category this way. Basically what I need is a code that find a specific letter into a sequence of letters with no spaces among them.

Any suggestions regarding my code?

Thanks for the attention,


WHERE GroupID LIKE '%[GroupID]%'

It should be

WHERE '[GroupID]' LIKE '%GroupID%'

I tried the code you mentioned and it gives no error messages but returns a blank list of categories (the code is not working as I imagine). The field called GroupID has a text format both in SQL and scriptcase.

[GroupID] global variable is declared just after user login into the application and I checked if the intended value is being set properly into the global variable and it is correct.

I don’t know if I am missing something with the quotes ’ or something else.

Any suggestion?

Thanks for your help.


Sorry I answered too fast, it should be

WHERE '[GroupID]' LIKE CONCAT('%',GroupdID,'%')

The code is working like a charm now. Thanks a lot for your help.

I still have some doubts on this calendar, but I will open a new topic to keep things better sorted into the forum.