How to delete data added to database according to current user after action has been done?

0
I have to delete the uploaded file in File document DB by the current user after successful execution of some actions. how could i delete data with respect to users.
asked
4 answers
0

You could retrieve all FileDocuments where the owner is the CurrentUser using an XPath query. You can then delete these matching FileDocuments.

answered
0

Hi Shivprasad,

 

You have to Create a XPath Query for resepected User  and retrive Uploaded file from Database and then you can delete data with respect to users.

answered
0

Hi,

 You can follow the following documentation for your doubt.

“https://docs.mendix.com/studio-how-to/microflows-how-to-configure-delete-object#4-configuring-a-delete-object-action-in-a-data-view”

answered
0

Hey Shivprasad,

 

When you create a document entity it will be generalized from System.FileDocument. All of the system members (createdDate, changedData, owner and changedBy) are automatically stored once a new object is created of your document.

 

To find the documents that are created by the current users you can use the following Xpath: 

[System.owner = $currentUser]

 

This will give the list that the currentuser has created. Then you can delete that list in your microflows.

 

Greetings,

Martijn Rijneveen

answered