Page 1 of 1

Read Only Calendars

PostPosted: Tue May 24, 2016 12:08 pm
by puddicom
Hello!

In a recent blog post, you mentioned being able to make certain calendar's Read Only, and that this could be scripted based on the users. Could you provide more inforemation on which script this takes place in, and how to make calendars Read Only for selected users only?

Thanks!
Nick Puddicombe

Re: Read Only Calendars

PostPosted: Tue May 24, 2016 1:49 pm
by John Sindelar
Hi Nick,

I've expanded the article here...

http://www.seedcode.com/pmwiki/index.ph ... r.ReadOnly

...to include step-by-setp instructions for adding the read-only attribute and an example of how to make it conditional for only some users.

Hope that helps,

John

Re: Read Only Calendars

PostPosted: Wed Jun 22, 2016 1:40 am
by Anatole Beams
What do we do if despite having updated the calendar to v9.78, we still have a script showing version 8.74?

Many thanks, Anatole

Re: Read Only Calendars

PostPosted: Wed Jun 22, 2016 7:54 am
by DanW
HI Anatole,

The script version comments will not update when running the in-app update. Many scripts have not needed to be changed, so you may find scripts with old version numbers.

When DayBack updates require FileMaker script changes, we link to instructions at our version history document below. Some scripts are changed by replacing all *contents* of the script, so you'll see new script version numbers there. For others, we'll provide instructions to add/modify individual script steps, so you may not see updated version numbers in those cases.
http://www.seedcode.com/pmwiki/index.ph ... ionHistory

If you're not sure if your script is up-to-date, you can always download a new DayBack demo from the link below and compare its scripts with your file's. Or, let me know what script you're not sure about, and I'll be happy to take a look for you!
http://www.seedcode.com/filemaker-calendar/

All the best,

Re: Read Only Calendars

PostPosted: Wed Nov 23, 2016 7:46 am
by Datagrace
@John Sindelar: Setting the source to read only doesn't prevent the the edit window from opening-- it now just has a 'Read Only' label on it. Any way to disable the click altogether, so the user isn't presented with a window they cannot use?

On a similar track, any way to get rid of the plus button (enter new source record) in the lower right?

Re: Read Only Calendars

PostPosted: Wed Nov 23, 2016 1:03 pm
by kcembrey
Hi John,

The first step to creating this behavior is to set it to open your own event layout:

Under the "Load Source Settings at Startup..." script, there's a line under each source that says "#Should we show event details using a FileMaker layout? Boolean - True or False." If you modify the value of the line below to True, it will automatically open the associated event layout, rather than the calendar popover.

Then, if you don't want any action when an event is clicked on, you can modify the "Show Event Details From WebViewer" script. If you're basing your read-only status on a specific condition, you'll want to enclose all the steps in the script with an if statement. You can either refer to the $$sc_SourceReadOnly[sourceNumber] variable repetition, or enter your own condition, to check if the source should be read only. This way, the script will be run if a user has permission to modify the event, and if they don't, nothing will happen upon clicking the calendar event.

To hide the plus button, you can add the following to the CSS file after the first few declarations:
Code: Select all
.add-event-container {
display: none;
}

For more information on editing the CSS, you can take a look at our documentation here.

Let us know if that works out for you,

-KC