cancel
Showing results for 
Search instead for 
Did you mean: 

AttachmentExistsIndicator not working as expected

03-26-2023 3:18 PM
fceylan_hs Participant
581 views 1 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi experts,

On Cloud Applications Studio, I would like to check if there's any attachment added on the specific node. For that purpose I think need to use AttachmentExistsIndicator property

if(this.AttachmentFolder.AttachmentExistsIndicator)
{
// logic goes here
}

The problem is; if attachment tab containst any document it works fine. But if there no document exist on attachments tab, this.AttachmentFolder.AttachmentExistsIndicator throws error. Is this system bug or expected behaviour?


0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

ThiagoSarmento
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi fceylan_hs,

You need to check first if the AttachmentExistsIndicator field is empty or not. For that, you can be using IsInitial() function.

Then, for you case, if it is not empty, the IF logic will be executed.

So you can try:

if(!this.AttachmentFolder.AttachmentExistsIndicator.IsInitial())

Answers (0)