Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Can I make objects conditional on a layout?


This topic is 7284 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi everybody

I am new to this forum, so here goes.

I am a keen to change the colour of fields on a screen on condition of its contents.

For example there is a "Copy Date" field that I would like to be black but then red if the system date is the same as the copy date.

I would also like objects to be visable or not visable on condition.

For example only "Manager" accounts can create new publications. I would like the "New Publication" button to only appear if the account = "Manager".

I would really appreciate any help here as I am just at the planning stages of a project and the above two issues could make an enormous difference to the design.

Many thanks

Sean

smile.gifsmile.gifsmile.gif

Posted

You can do the first by creating a calculated field.

In addition to the actual date field, create a calculated field like this returning a text value:

If ( Date = Get ( CurrentDate );  

     TextColor (date ; RGB ( 255 ;0 ;0 ) );

     Date 

)






If you want the date field to be editable on the same layout, place the calculated field directly on top of the original field, give it a background color, and make it non-enterable. 



For the button, the easiest approach would be to duplicate the layout, add the button to only one copy, and have a script decide which layout to display. You could also do some tricks with calculations to hide the button, but I think a separate layout is easier.



Here's pseudocode for a script


If get(username) = "Manager" 

   goto layout A

else

   goto layout B

end if

Creating scripts to manage all of the user interface navigation is a bit more work, but it gives you much better control and security.

This topic is 7284 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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