Link to home
Start Free TrialLog in
Avatar of David Schmalzer
David SchmalzerFlag for United States of America

asked on

Paste and formula or script

Ok, here's what I want to do. I have 2 fields on a form. The first one is Prodnumber the next field is Prodname.
I want to be able to paste this whole string -->QL51578 (BEER FLAVOR MIXTURE (QL34589 NAARDEN)) into the first field, then upon refreshing or saving, I want this part of the string -->BEER FLAVOR MIXTURE  to drop down to the second field.  So in the end the first field would contain: QL51578  and the second field would contain:
BEER FLAVOR MIXTURE.
Yes, I want the rest of the string besides the product number to disappear in the first field upon refreshing or saving.  Does that make sense?
Avatar of Arunkumar
Arunkumar

I feel like drunk !!! LOL !!!
Hey Sno! I got it with in a minute hobout that ???
Yeah but you didn't provide an anwer yet!
If the string is always in this format then i could suggest you something.  If you paste someother formats then it wont work....

:-)
Yes it makes sense!  Is that the answer you wanted? So easy!
Avatar of David Schmalzer

ASKER

Same format every time.
Same format every time.
You could use @Left and @Right then to strip out the first 7 characters then, assuming the product number always has 7 characters... or grab everything to the right of the first SPACE.
in the post recalc event have this formula

a := prodnumber ;
@SetField("prodname" ; @Middle(a ; "(" ; "("));
@SetField("prodnumber" ; @Left(one ; "("))

-Arun.
I got it Sno!
oops! there was a mistake i had my field name there as "one"

This is the revised one.

a := prodnumber ;
@SetField("prodname" ; @Middle(a ; "(" ; "("));
@SetField("prodnumber" ; @Left(a ; "("))
Sno!  I get an "A" for this one and i will be just short of this 100k.... haa haa haa... i am cruising closer to the milestone now.
Ha ha ha, I suggested left first by a millisecond!
Where is the post recalc event?
ASKER CERTIFIED SOLUTION
Avatar of Arunkumar
Arunkumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
AWESOME!!!!  THANKS!!!
You're welcome, I'm glad I could help.
LOL !!! I knew that Sno would comment something like this.

:-)
See you also know me to well buddy!