Hi, I need to show different images depending on the value of a field. I created a workflow to check the value of a field and replace the image value using the instruction:
Ex.
imageId = '62d92ea2194668b23';
The images are correctly uploaded to the "upload" folder but when the control field condition changes and therefore the "imageId" value changes, one of the images (the one that is replaced) is physically deleted from the upload folder.
Ex.
ifThenElse (
field == 'A',
imageId = 'id of pic1.png',
imageId = 'id of pic2.png'
);
Case 1:
field = A
imageId = 'id of pic1.png'
the images are both in the upload folder.
Case 2:
field != A
imageId changes from 'id of pic1.png' to 'id of pic2.png'
the 'pic1.png' image is deleted from the upload folder.
My Espo version is 7.1.3, Advanced Pack is 2.9.3.
I hope I well explained myself and that you can help me solving this problem.
Thank you
Ex.
imageId = '62d92ea2194668b23';
The images are correctly uploaded to the "upload" folder but when the control field condition changes and therefore the "imageId" value changes, one of the images (the one that is replaced) is physically deleted from the upload folder.
Ex.
ifThenElse (
field == 'A',
imageId = 'id of pic1.png',
imageId = 'id of pic2.png'
);
Case 1:
field = A
imageId = 'id of pic1.png'
the images are both in the upload folder.
Case 2:
field != A
imageId changes from 'id of pic1.png' to 'id of pic2.png'
the 'pic1.png' image is deleted from the upload folder.
My Espo version is 7.1.3, Advanced Pack is 2.9.3.
I hope I well explained myself and that you can help me solving this problem.
Thank you
Comment