Clear an Attachment field based on parent answer
I have an a Parent field (1A) that requires an attachment (1B) if answered Yes. If Parent 1A is Yes and an attachment is added to 1B but then the user changes the Parent 1A to No, I'd like to clear out the attachment if they did not. I'm unable to do this with DDEs or datafeeds since we cannot evaluate an attachment field in a rule, report, etc.
Does anyone have custom code that will look to the parent and then clear the attachment field, if necessary?
Any help or input is appreciated! 🙂
Jacqueline, you can do this with a data feed and a report. Create a calculated numeric field for the attachment field, COUNT([Attachment Field Name]). Then in the report add the filter for the question and the calculated numeric field greater than 0.
Thank you David. Apologies as I should have mentioned that I we have maybe 15 or 20 of these fields per application (and several applications) so we're trying to stay away from adding so many data feeds. I do currently have datafeeds clearing Text Fields and User Lookup fields but the reports contain all fields in one report and those that do not need to be cleared are just written over with the same data in there. Unfortunately, I cant grab the value of the attachment and re-populate it.