My Form has a photo field (titled “Picture”). I would like to do a saved search that lists each record that does not have a picture. But when I open the search dialogue, the “Picture” field does not show as one of the options to search by.
1 – Is this an unusual issue with my From, or
2 – If it isn’t in fact possible to search attachment fields, is there another way to do this?
Thanks!!
2 – If it isn’t in fact possible to search attachment fields, is there another way to do this?
You can use a field script and use following code. This will return 0 if there are no photos and 1 if there is at least one photo. You just need to add the ID of your Picture field.
function Has_Photo() {
let photo_id = 'fld-xxx';
let photo = record.getFieldValue(photo_id);
if (photo.length > 0){
return 1;
} else {
return 0;
}
}
Has_Photo();
Fantastic – that works perfectly. Thank you!