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

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

Recommended Posts

Posted

does any one know a way of getting the initials from text i just need the first letter fromeach word in a product name to put in a chart

help please

ps i dont want to have to define any more fields if poss

Posted

The only place where you can use circular reference is in script, ie

Set Field ("x", "x+1") for ex.

But then you'll loose the original data it contained.

So I don't see the way to do what are you looking for without creation of aux field(s).

Dj

Posted

sorry did not really explain to well before

i am using a plugin to create charts for product sales but the names are to long to fit on the chart so i just want their initials passed to the plugin

at the mo i am using

Set field gtext ; ["legend text( ]

loop

set field gtext ; [gtext & "product name" ]

goto next row

end loop

set field gtext ; [gtext & ")"]

this will create a line passed to the plugin legend text ( prod1 prod2 prod3 prod4)

or somerthing similar

but instead of using the product name i was wondering if there is any way that by using a combination of left word and substitute or some of text script step

hope that explains it better

cheers

Posted

OK

Here's the script


Set Field [temp,Substitute("|_" &field1 & "|_" & field2 & "|_" & field3 & "|_", " ", "^_")]

Loop

ExitLoopIf[PatternCount(temp, "_")=1]

Set Field [temp,Replace(temp, Position(temp, "_", 0, 1), Position(temp, "_", 0, 2)-Position(temp, "_", 0, 1)-1, Middle(temp, Position(temp, "_", 0, 1)+1, 1))]

End Loop

Set Field [temp,Trim(Substitute(Substitute(Substitute(temp, "^", ""), "|_", ""), "|", " "))]

I've used temp at place of your field gtext

HTH

Dj

This topic is 8245 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.