AnsweredAssumed Answered

Hide Object Button if container houses a specific type of document

Question asked by soul on Jan 19, 2019
Latest reply on Jan 19, 2019 by soul

I have a database that using many containers to store files and items pertaining to the project at hand.

I do have a field when an item is placed into the container to specify file name and extension.

I have a button that will open the file in the container field only if it is a pdf.


What I am wanting to do is have the button that displays VIEW and will perform scripts to open the pdf to hide if the container_text is not a pdf file.


Container is for: pdf files; images; voice memos and other types of documents. Using this as a collection house to files on a given situation. When the container is empty I have a simple text box that shows a simple message -- not viewable.


"View Button" displays for all items in the container field which is what I want to change -- that is what I would like to hide and of course i would reverse the code for the other button that indicates Not Viewable. It needs to hide if the field box for text. I intend to overlap the text box on top of the View button.


NOT VIEWABLE [simple text box] hides if the container field has an item within in and will appear if the containter_text is not a pdf file.


Those that use the database with me like to hit view. This problematic. I get many call despite my love notes to them.




I have tried a variety of techniques and I am not finding a good solution.

I tried a function that would call up the file extension, then based on the answer would indicates yes or no.


Any suggestion?


I appreciate any site you can give.