serp Posted October 28, 2004 Share Posted October 28, 2004 I have a text field. 20 users. Each time a guy is looking one branch we paste the branch's id, per.ex, 010062. So if a second guy go to the same branch: 010062 010062 040033 etc Also I have a script if (Patterncount (x;010062) > 2; block entrance; allow entrance) I would like to remove this "id branch" after 1 guy "leaves" the branch, but just ONE "010062" not all. So 2 guys in 010062, after 1 goes out, there is still ONE 010062, not two!! How I can manage that? Link to comment Share on other sites More sharing options...
-Queue- Posted October 28, 2004 Share Posted October 28, 2004 Set Field [textfield; Replace( textfield; Position( textfield; "010062"; 0; 1 ); 7; "" )] Link to comment Share on other sites More sharing options...
serp Posted October 29, 2004 Author Share Posted October 29, 2004 Set Field [textfield; Replace( textfield; Position( textfield; "010062"; 0; 1 ); 7; "" )] Thanks Queue Link to comment Share on other sites More sharing options...
-Queue- Posted October 29, 2004 Share Posted October 29, 2004 Look in the online help for information regarding the Replace and Position functions. You'll see that since Position has an occurrence parameter of 1, it will find and replace only the first instance of "010062" in textfield. Replacing 7 characters allows the trailing Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7116 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