Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6987 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I have read most the manual, and unless I can get someone to answer this I'm going to go nuts. In the scripts, how do I change the setting so the cursor starts at the front of a text string when it moves to a field. I need to paste a "1" at the start of a phone number string. Is there some property that I have not seen that changes the insert point. the manual says to change it, but not how. I worked around it by copying, clearing, inserting text, then pasting. Thats like 5 steps to do 1 thing. Anyone, please.

Posted

Of course the problem is firing the script - if User tabs to it, it won't fire. But if you use script (attached to field or otherwise) and just want to START at the beginning of any text, you can also just use:

Set Selection [ PhoneField ; 0 ; 0 ]

It depends upon whether this is User activated (and the cursor remaining at the beginning is important) or only script activated to insert a 1 (in which case, use Ralph's suggestion).

LaRetta

  • Newbies
Posted

Thanks I appreciate the help

Here is the line I'm having trouble with

SUBS Converted 2::Fax # &"1" & SUBS Converted 2::Fax #

Of course im running this in a loop, which works fine. But this does nothing. When I try to add the semi colon as you have it, I get a bunch of error messages. What am I doing wrong.

SUBS Converted 2::Fax # <- is the actual field name - sorry.

Posted

Try: Set Field [ SUBS Converted 2::Fax ; "1" & SUBS Converted 2::Fax ]

I assume that SUBS Converted 2::Fax is a text field. Use the set field script step. The first SUBS Converted 2::Fax is the field you are going to set. The "1" & SUBS Converted 2::Fax is the calculation used to set the value in the field.

If you want a space between the 1 and the rest of the number use "1 " rather than "1".

  • Newbies
Posted

I did that already but when I put the semi colon after the first field mark like

SUBS Converted 2::Fax ; "2" & SUBS Converted 2::Fax

I get the following error message "an operator(e.g. +,-,*...)is expected here" when I click the OK button.

If I put in an ampersand it lets me save it like in

SUBS Converted 2::Fax & "2" & SUBS Converted 2::Fax

But it does absolutely nothing. Am I not understanding the syntax? I entered it just as you said, but it says its no good. BTW the # after the word fax is part of the field. the field is "Fax #" Could that be part of the problem?

Thanks

Bill

Posted

In that Set Field[ ] calculation listed above, everything to the left of (and including) the semi-colon should NOT be included in the calculation box. That is the field you select in the 'Specify Target Field' portion of the script step. So your formula (when your calc box opens) would be:

"2" & SUBS Converted 2::Fax

You are setting the same field to itself (with a number preceeding).

LaRetta

This topic is 6987 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.