AnsweredAssumed Answered

Script to switch to another person

Question asked by ultranix on Oct 6, 2014
Latest reply on Oct 6, 2014 by philmodjunk

Title

Script to switch to another person

Post

I have a contacts table, in which, most of the cases, one contact is responsible for one property. Sometimes 2 persons are responsible for 1 property, so, in order to "switch" to another person, i use such script (screen attached). 
and it works like a charm to switch between 1st person (who has id_conta and no id_alt) and 2nd person (whose id_alt is 1st person's id conta and has his own id_conta).

But in rare cases, there are 3 or more people responsible for the property. So how do I "switch" between them? I want to click button and if I'm on 1st person, switch to 2nd, if i'm on 2nd, switch to 3rd, if on 3rd - switch to 4th, if 4th is the last - switch back to 1st.

How do I have to adjust this script?

switch.jpg

Outcomes