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
6 replies
Subscribers
7 subscribers
Views
2879 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Can any body please let me know,how to find whether a folder exists with partic
Raviteja Varma Jampana
A Score Level 2
over 10 years ago
Can any body please let me know,how to find whether a folder exists with particular id or not ?
My requirement is to find whether a particular folder with id is deleted or not.When ever i am passing integer (id of deleted folder) to rules which accepts a folder ID as input they are returning exception.So how to find whether it exists or not.
Thanks in advance...
OriginalPostID-91772
OriginalPostID-91772
Discussion posts and replies are publicly visible
0
shelzle
over 10 years ago
This rule returns true if the id points to a valid document
=index(split(getcontentobjectdetailsbyid(ri!id), "Type: "), 2, "") = "Document"
Any better ideas are welcome :-)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shelzle
over 10 years ago
When you modify the rule to check for the string "Folder" you can check for folders.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
David Williams
over 10 years ago
Not sure if this is relevant, but I think folder id's are re-used along with document id's ... I believe they share the same object reference. This caused some headaches and lots of confusion until we discovered this!
So while you are checking if a folder has been deleted, it may have been deleted, but then re-used by something else.
You might want to get this verified by Appian though!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Raviteja Varma Jampana
A Score Level 2
over 10 years ago
Thank you Shezle. It is working fine in case of true .but it is again throwing excption in case of invalid folder id
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Raviteja Varma Jampana
A Score Level 2
over 10 years ago
Thank you davidwi
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Steven Miccile
Appian Employee
over 10 years ago
Starting in Appian 7.2, document and folder id's are not reused if the object is deleted:
forum.appian.com/.../Data_Types
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel