Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
6 subscribers
Views
3639 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
How do we check before hand if a document exists when we have a ID
raghunandanj3904
Certified Senior Developer
over 7 years ago
Is there a way to find if the document is already in the system, before we use the document() function with the attributes. Suppose we store the DocumentID in DB and while retrieving the document if the document was deleted from the system, how do we make sure the availability of the document in the system. If we use the document function, it will throw error saying document doesn't exist or been deleted and script task gets stuck.
OriginalPostID-233463
Discussion posts and replies are publicly visible
Parents
0
Mike Schmitt
Certified Lead Developer
over 7 years ago
You could instead use the Content Details by UUID plugin, which contains the "getContentObjectDetailsByID()" function. Here's my expression rule:
if(
rule!APN_isBlank(ri!docId),
false(),
trim(
extract(
getcontentobjectdetailsbyid(id: ri!docId),
"Type:",
"]"
)
)
= "Document"
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Mike Schmitt
Certified Lead Developer
over 7 years ago
You could instead use the Content Details by UUID plugin, which contains the "getContentObjectDetailsByID()" function. Here's my expression rule:
if(
rule!APN_isBlank(ri!docId),
false(),
trim(
extract(
getcontentobjectdetailsbyid(id: ri!docId),
"Type:",
"]"
)
)
= "Document"
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data