Action Link Update Certain Connected Records

Hello,

Short version: I have an action link updating a connected record but I only want to update connected records where a field has a certain value, is this possible?

Long Version:
I have a shopping cart like set up on knack for registering for events.

I have a page where people choose what events they want to attend and it adds a record to a registrations object with the status pending connected to that event.

The ‘cart’ then lists pending registrations and when they click check out it creates a record in a another object called temp carts which is basically the same as the order table, once they pay the order is created in the order object from the temp cart and it updates the registrations to status paid.

All of the above is working fine.

The problem I have is on that page where they select registrations I am using action links for them to add/remove things from their ‘cart’.

The remove is set to update connected records which are the registrations, I just clear all the values and have an integromat scenario set to delete the empty registrations daily. The problem is it is clearing out the paid registrations as well if they had already previous bought one. So I would like it to only update the pending registrations, since it is a connected record the only values I see for criteria are for the event object.

I think I will have to custom code my own remove link to filter out the paid registrations but figured I would ask here first.

Thank you,
Lori

@JBS - sounds like another job for Integromat. When the action link fires you could use a webhook or mailhook to get the record and then check related data to see if it meets the criteria before updating. :thinking:

Might be off track but could you hide the Action Link when the right conditions for the record exist instead?

1 Like

Hey @BradStevens could you describe what exactly are the right conditions? If the conditions are visible in the table, you should be able to easily code it in JS… How comfortable are you with coding in the JS backend? Can come up with a code solution once you fill me in on the details…

Hi @Arjun - what I mean is to hide the action link for the conditions you don’t want it to be available. I think what might work is to hide the action link for paid registrations in the table based on your description?

Thank you for all the responses. I ended up custom coding the link so it would remove the connected record using javascript.