Page 1 of 1

Read-Only: True stop working

PostPosted: Tue Jun 04, 2019 4:05 pm
by jffortier
Hi,

I set my source to read-only based on the user's privilege.

variable is $$sc_SourceReadOnly = True.

User can move events by drag and drop in the calendar, I run the script debugger, but I can't find anywhere a halt when the source is ready only to prevent users from moving the event.

Can you guide me where I can find that script step, maybe I removed it by mistake ??

Thanks,

Re: Read-Only: True stop working

PostPosted: Tue Jun 04, 2019 5:59 pm
by kcembrey
Hi Jeff,

I've just tested on a stock copy of the latest DayBack and I've verified that dragging and dropping is blocked in the web application, so it doesn't even try to write back the data using any FileMaker scripts.

It could be that the source isn't being set as read-only as expected. If you're using the built-in popover, you can verify by clicking on an event and making sure that it says "Read Only" at the bottom and doesn't allow field modification.

Using the data viewer, make sure the value for the $$sc_SourceReadOnly variable is set to 1 (true) for the source you're trying to have read only. This means that, if you're setting your Source No 2 to read only, $$sc_SourceReadOnly[2] should equal 1.

If you're still not able to get it to respond like it should, let us know which build of DayBack you're running and I'll take a look at a stock copy of that build.

Regards,

KC

Re: Read-Only: True stop working

PostPosted: Thu Jun 06, 2019 6:59 pm
by jffortier
Hi,

I use the current version 10.49, still under subscription.

It is set to True or 1 same results.

When I click on it, I don't use the standard popover, I have a custom new window with my layout design of my event.

So it must be somewhere in the script that read if $$sc_SourceReadOnly = 1 Halt script... but I don't see it.

So where should this restriction be ?

Re: Read-Only: True stop working

PostPosted: Fri Jun 07, 2019 12:21 pm
by kcembrey
Hi Jeff,

It's actually not a FileMaker script that restricts the events from being modified, but the JavaScript code in the DayBack web viewer. Here's a video showing the expected behavior: https://seedcodevideos.s3.amazonaws.com ... s2nzol.mp4

You mentioned that the variable $$sc_SourceReadOnly = True. Have you verified that the events you're testing with are on your first source? If it's another source, such as source no 2, then the repetition of that variable, $$sc_SourceReadOnly[2], needs to be true.

If you're still not seeing this behavior after verifying the source of the events you're testing with, let us know and I'll reach out by email to get a copy of your files so I can troubleshoot on my end.

Regards,

KC

Re: Read-Only: True stop working

PostPosted: Mon Jun 10, 2019 4:28 pm
by jffortier
Hello,

I only use one source, and I removed the left menu option to select a source.

So I guess somewhere in the javascript process something got lost ??

I can't realy send you a copy of my file, to many SQL connections and it's in french !!

But I sure can send you the files in the container field or the .js file in the temp folder ??

Re: Read-Only: True stop working

PostPosted: Mon Jun 10, 2019 4:42 pm
by kcembrey
Hi jffortier,

I'll reach out by email to see set up a screen-share so we can continue troubleshooting this.

Regards,

KC

Re: Read-Only: True stop working

PostPosted: Sat Jun 15, 2019 7:47 am
by jffortier
I'm writing this for my fellow FileMaker newbies like me who may search the forum for answers !

My problem was in the script Load Source Settings at Startup --- Describe Your Sources Here --- on the line 44 (Read Only).

If you set the variable to TRUE or FALSE don't use quotes "TRUE" or you can use 1 or 0 :roll:

Thanks to KC who found it in 2 minutes !!

Re: Read-Only: True stop working

PostPosted: Mon Jun 17, 2019 7:51 am
by kcembrey
Hi jffortier,

Thanks for posting that!

Regards,

KC