05-02-24 10:04 AM
Hi BP Community,
This may be very simple question, but was not able to get a clear answer via Google. My question is:
Is it possible to programmatically unload/reset an Image Data Item? And if yes, how can this be achieved?
To give a little more context. In one of our processes we work with a image data item. The image is loaded via a code stage. We do this as we have to resize the image via the Image Manupulation utility.
Many thanks in advance!
With kind regards,
Arthur Philippa
Lead RPA Developer
Port of Rotterdam
05-02-24 08:20 PM
I didn't fully understand your question. Do you want to clear the image variable in the same way it's done with the process page using "Reset Global Data Items"?
After conducting some tests, I was unable to succeed in clearing the data item, whether using a Calculation stage with an empty data item or a new page with the output set to empty.
However, I found an alternative. You can use a Collection. Create a field of type Image and set the Initial Value as an empty row. After obtaining the image value within the collection and completing the manipulation, use the internal "Collection" Utility action and employ "Remove Row" to clear the stored value.
Adapt as needed, taking into consideration the specifics of your environment and process.
06-02-24 12:08 PM
@wagnervasconceloos Thank you for your answer. I indeed was referencing on clearing the image variable from the data item. Working with a collection with a image data field indeed seems to be a viable workarround for resetting the data item variable. Thanks for the suggestion.
06-02-24 01:04 PM
I'm glad I could assist you in some way. If possible, could you please mark this response as the best answer? I appreciate it!