Security filter stops auto-deletion of child records??

I have a table that has a ref into it from a Google Calendar data source.  That ref has the "is part of" attribute checked.  When security filters are not on for the Calendar data source, everything works as expected.  If a user deletes the "parent" record in the table, it deletes the "child" record in the Calendar data source also.  If I put a security filter on the Calendar data source that ensures only the proper user can see the Calendar data (I have verified this is working as expected as far as visibility goes), it stops being able to delete the child entries when the parent table entries are deleted.  Why, and what might I need to do to overcome this problem?  Thanks in advance.

Solved Solved
0 9 144
1 ACCEPTED SOLUTION

Ended up filing a support ticket.  So that others can be aware:  References/de-references do not work as expected when actions are applied on Google Calendar data sources when security filters are in place.  You must code any actions/bots to use Select() statements instead and not rely on parent-child relationships and so on.

View solution in original post

9 REPLIES 9

Security Filters should not affect the Parent/Child behavior - provided they are implemented  correctly.  I have apps that rely heavily on Security Filters for performance boost and have many Parent/Child relationships.  I have experienced no issues with child rows being deleted automatically when a parent is deleted.

--- What is the behavior you are seeing?  Is there some error that occurs?
--- What are the Security Filters that you have implemented?   

The only scenario I can think of where the child wouldn't be deleted is if that child row was filtered out and NOT present in the dataset at the time the Parent row was deleted.  But I believe you said you have confirmed that the child is present.

In that case, I think it may be a bug.  The integration of Google Calendar is fairly new and it may very well be that no one has exercised this particular use case and was overlooked in the implementation.

Willow,

Yes, I can "see" the children (calendar items) in the data set, they are not being screened out.  The filter I am using on the calendar data is:

or(in(useremail(),[Attendees]), in(useremail(),extractemails([Title])))

The creator's email is automatically placed in the title of each calendar event along with some other stuff that makes it effectively a unique ID (primary key).  The above scenario should cover events that someone is invited to as well as if they are the creator.

The only behavior I see is that when this security filter is in place, deletes in the "parent" table cause automatic deletions in the "child" table (calendar data).  When I put the above in place, even though the child data is visible in the app, they do not get deleted automatically upon parent deletion.  If I remove the filter, it goes back to working correctly.

EDIT: Removed passage about ref_rows breaking, I was mistaken on that point. 

It's worth noting I have a security filter on the parent table as well, which is:

useremail()=[Creator]

It seems to have no negative impact on its own.  Is it possible there's some kind of interplay between the two filters?

 

I have now gone even so far as to create a bot that deletes related calendar events upon parent record deletion.  I checked "bypass security filters".  It won't work, either.

To add to the confusion, I have now found that having the security filter on the *parent* table for some reason prevents certain things from occurring as well.  For instance, the deletes work fine if I remove the child table filter, but I have another process that, when an event is changed on the parent table, it deletes the current event from the calendar and adds a new event (effectively "changing" it).  This only works with no filters on either parent or child table, even if "bypass filters" is checked.

Sorry if this is information overload, but I'm desperately trying to solve this today.  I found that if I change the security filters to simple "=true", everything works.  So it's not the mere presence of a security filter messing up these bot processes and ref deletes, it's the expression, I guess???

Please file a support ticket.

I'd prefer to only do that as a last resort.  The last time I filed a support ticket, support edited my app without my knowledge and caused more problems than they solved at first.

Ended up filing a support ticket.  So that others can be aware:  References/de-references do not work as expected when actions are applied on Google Calendar data sources when security filters are in place.  You must code any actions/bots to use Select() statements instead and not rely on parent-child relationships and so on.

Top Labels in this Space