comment Posted November 1, 2022 Posted November 1, 2022 (edited) 6 hours ago, Raymack said: What is a simple way to test for this? I assume by "this" you mean the absence of related records. Because a portal can be empty even if related records do exist - on account of the portal being filtered. The test suggested by @bcooney tests for the absence of related records. In normal circumstances, it will return true when no related records exist. However, if something went wrong and the related records do not have a value in their id (i.e. primary key) field, then you will get a false positive. So it is better to test for: IsEmpty ( RelatedTO::MatchField ) If the match field contains only non-zero numerical values, you can shorten this to: not RelatedTO::MatchField Edited November 1, 2022 by comment
Raymack Posted November 1, 2022 Author Posted November 1, 2022 Thank! I had a script working fine to delete the portal records, but of course, SOMEONE will hit the DELETE button anyway! So wanted to test and intercept this possibility...Good to know a new function! Bye R@y
Recommended Posts
This topic is 822 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now