David Schmalzer
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?
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?
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!
ASKER
Same format every time.
ASKER
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!
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 ; "("))
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!
ASKER
Where is the post recalc event?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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!