Ui Macro does not working on Form popup screen

TATSUYAHIGUCHI
Tera Contributor

Hi,

 

I have added logic to the existing “attachment_entry” to hide the target element. (Using Ui Macro)
This hides the “Choose File” button that appears in the “manage attachments” popup.
It is as follows

TATSUYAHIGUCHI_1-1721352103326.png

◆List

TATSUYAHIGUCHI_0-1721354300076.png

◆Form

TATSUYAHIGUCHI_5-1721354065886.png

 

If you open the popup from a list, the button will be hidden.
However, if you open the popup from a form, the button is not hidden.
This is unexpected.
Why is it that when I open a popup from a form, the target button is not hidden?

 

Regards,

 

3 REPLIES 3

AnirudhKumar
Mega Sage
Mega Sage

Hey @TATSUYAHIGUCHI ,

This is not the right approach. What you need to do instead is to disable attachments at the table level

 

Check this SN page for the steps:

https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/form-adminis...

hi, AnirudhKumar!

 

Sorry, I have a problem.
I want to prohibit file attachments from the List side only.
This is what I would like to implement.
I would like to allow file attachments from the form side.
Since it was difficult to achieve, it is implemented as described in the topic using UI Macro.

 

On top of that,
I would like to know why the list screen and the form screen do not behave the same due to the Ui macro implementation.

 

Thanks,

Hmm... I see what you mean.

I assume you have a different group of users who should be given access to read incident records(list), but not attach files from the list ?

If that is not the case, I'm afraid the attachment behavior is going to be same in both same in list. Either disable in both places, or allow in both places.