The CreatorCon Call for Content is officially open! Get started here.

Catalog client script to require attachment doesn't work when there is an attachment?

Jared Wason
Tera Guru

Hi,

I have a catalog item where if the user selects the option 'Meditech' they need to attach an document. I have created a catalog client script to require attachment when the variable is selected. However even if an attachment is added, it still prevents users from submitting. Below is the code I am using, the section that is commented out did the same thing. I currently have the Isolate Script field set to False. When it was set to True it would give me an error message.

 

JaredWason_0-1690905340140.png

JaredWason_1-1690905441355.png

 

 

1 ACCEPTED SOLUTION

Alex Rose
Tera Guru

While I am not sure exactly what your issue is here, I think it would be much more simple to use an attachment type variable, and hide the normal attachment using Hide Attachment in Portal Settings.

 

With an attachment type variable, instead of your client script, you can use a UI policy:

  • When to apply: Password Reset User Access Type is 'meditech'
  • Actions:  Attachment variable is mandatory
  • Set reverse if false

View solution in original post

2 REPLIES 2

Alex Rose
Tera Guru

While I am not sure exactly what your issue is here, I think it would be much more simple to use an attachment type variable, and hide the normal attachment using Hide Attachment in Portal Settings.

 

With an attachment type variable, instead of your client script, you can use a UI policy:

  • When to apply: Password Reset User Access Type is 'meditech'
  • Actions:  Attachment variable is mandatory
  • Set reverse if false

Tushar
Kilo Sage
Kilo Sage

Can you please paste the code here.