Jump to content
Sign in to follow this  
J__

how do i create read only layouts?

Recommended Posts

Hi,

I'm interested in creating a layout, which can be displayed in edit mode and also displayed in read-only mode. A user wants a screen where they can only look - but cannot touch.

I know you can set permissions for this, but one potential problem is that the user actually wants a button for editing and a button for new and a button for viewing. I guess they feel it takes away their worry about accidentally changing a field without meaning to - and I can understand that....

anyway, so what is the trick?

thanks for your help in advance,

sincerely,

J__

Share this post


Link to post
Share on other sites

Hmm..

Duplicate the layout, and reset all field access in the second one.

Or if this layout should behave according to given parameters, then check privileges set.

Share this post


Link to post
Share on other sites

You could default to going to the layout for view only, then click a button for editing. The button could either go to a duplicate layout with edit access, or could cause a relogin to a user with edit privileges.

Share this post


Link to post
Share on other sites

The 'different parameters' are simply your button script toggling 1 or 0. 1 allows Edit, 0 does not. You can create Extended Privilege Set and let permissions check the toggle and allow access accordingly to the boolean calc. You don't need to have Users relogin.

I am against the concept of duplicating layouts. If you change one, you always have to remember to change the other to match and if you don't align properly, the switch is obvious. It wastes resources (bloats file size) simply because of a Developer's inability to solve things in other ways. It's an easy, but inefficient cheat.

Share this post


Link to post
Share on other sites

I prefer the visibility technique, using portals to allow or not allow access to fields in Browse Mode and to allow full access in Find Mode.

Share this post


Link to post
Share on other sites

MoonShadow wrote: "I am against the concept of duplicating layouts."

I have to agree with you there.

However, from an interface perspective, it's good showing users when they can edit a field and when they cannot. Probably the most commonly used method is giving an editable field a white background, and a locked field a grey background. It's possible to do thsi in FMP 7 with calculated container fields behind transparent fields, but it looks crap when they enter a field.

So for me, duplicate layouts are the option that provides the best interface. But it is definately a maintenance overhead.

Share this post


Link to post
Share on other sites

You could default to going to the layout for view only, then click a button for editing. The button could either go to a duplicate layout with edit access, or could cause a relogin to a user with edit privileges.

thanks to all for responses. Transpower, what do you mean by default to going to a layout for view only - how do i set the layout to be view only? i looked at the "go to layout' script, but don't see any options there. do you mean access security stuff?

the only problem i see there (or my confusion?) is that it seems that my user will have permission to edit, view and create/new. it's just that one layout has to be read-only. how do i make the fields read-only, without doing this in the database table - since my other views would need writeablity to those fields?

thanks for the help, i really do appreciate it,

sincerely,

J__

Share this post


Link to post
Share on other sites

Ah- I figured it out! doh!... field Behaviors is the trick

excellent. Why didn't you guys just say that : <grin>

thanks,

J__

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.