Forum Discussion
Thanks for the reply. I am in fact deciding to do something similar to this. The sticking point really is this - I would love to have that conditionally shown button on home page or dashboard. That is really only possible if you sneakily do it by showing a report with 1 record on it. This works, but is not super clean looking. That is why I was originally hoping to actually limit who could add, so that if they clicked the button on the home page, it would say 'permission denied'.
Though, it may be possible to make a custom button......I gotta play around with a few things. Ill report back if some ideas in my head work out.
------------------------------
Mike Tamoush
------------------------------
One option is to have a button on the home page that points to a code page. The code page can use the API to return the current user (API_GetUserInfo). Then you can query the users table for that user and check whether or not they have permission. If they do, you redirect them to the add form, otherwise you show them a "permission denied" message. Of course, this doesn't solve the problem of conditionally showing the button on the home page.
Another slightly more complicated option is that you have two home pages set up. One for users who have access to add records, which will have the add record button, and one for everyone else that doesn't have the button. Then in the user roles, you set the home page for everyone to a code page. The code page uses the API to check the user's permission as in the first option, and then depending on whether or not they have access, it redirects them to one of the two "real" home pages. That would solve the problem of conditionally showing the button.
------------------------------
Tyler Jablonski
------------------------------
- MikeTamoush2 years agoQrew Commander
Tyler,
The code page is probably a good idea. Unfortunately, im a low code no code user so the code pages are past my knowledge. All I can do is take a pre-existing page and modify it for my own use. Don't suppose you have a sample of this type of thing? :)
------------------------------
Mike Tamoush
------------------------------