Parent (SUITES) / child (TENANT). SUITES owns TENANT.
Suites.Tenant = relationship of all Tenants owned by Suites.
Teant.Suite = relationship from Tenant back to Suite.
During an Create/EDIT of the child (TENANT) , if I turn on a value, on save I want all other children of this parent value turned off. There can be only one active. I have a few rules on the BO to do calculations on save, and then end with check if you have turned this value on. However it's turning all children values off, including the one I just saved. I've tried separating it into a process, but same results.
CONDITION
Tenant.Active = 'YES'
ACTIONS:
1. Find Tenant Where Tenant.Suite = ThisTenant.Suite and Tenant.ID <> ThisTenant.ID
2. Tenant.Active = 'NO'
3. Tenant.Suite.Vacant = 'NO'
4. Tenant.Suite.ActiveTenantNo = Tenant.ID
5. Tenant.Suite.ActiveTenantName = Tenant.Tenant
Syntax for updating all other child records except current.
-
- Posts: 139
- Joined: Sat Feb 10, 2018 12:56 am
-
- Posts: 139
- Joined: Sat Feb 10, 2018 12:56 am
Re: Syntax for updating all other child records except curre
I'll add, that according to the Rules Log, the Find is finding the other child records. It find s a count of child records -1.
Re: Syntax for updating all other child records except curre
maybe: https://awareim.com/forum/viewtopic.php?f=1&t=10705
and also read this about 'in batches of 1'
and also read this about 'in batches of 1'
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 139
- Joined: Sat Feb 10, 2018 12:56 am
Re: Syntax for updating all other child records except curre
Jaymer - you sir are a genius.
OtherBO
OtherBO
Re: Syntax for updating all other child records except curre
glad that helped, but its a group thing - i'm not a genius. everyone knows something that can help someone else.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL