Current Text to Global Variable ?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
othni
Posts: 34
Joined: Tue Mar 01, 2005 1:47 am
Location: San Juan, Puerto Rico
Contact:

Current Text to Global Variable ?

Post by othni »

I execute some SQL select commands that outputs a single value. It is just a word with some spaces. I use a Replace filter to trim the trailing spaces.

I need to declare that value (or word) as a Global Variable.

I see there is the Capture to Variable filter. But do not know a way to set it as just the resulting text at that step within the filter.

Thank you
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Drag the Capture Filter as a subfilter of the Replace filter.
othni
Posts: 34
Joined: Tue Mar 01, 2005 1:47 am
Location: San Juan, Puerto Rico
Contact:

Post by othni »

Thank you , I will try it tomorrow!
othni
Posts: 34
Joined: Tue Mar 01, 2005 1:47 am
Location: San Juan, Puerto Rico
Contact:

Post by othni »

I could not make it work.

I am using the Add File Header filter and using the @variable but it does not translate to the variable. It translate to blank.
othni
Posts: 34
Joined: Tue Mar 01, 2005 1:47 am
Location: San Juan, Puerto Rico
Contact:

Post by othni »

Ok, I made it!

Instead of using the Capture Text filter aproach, I used a Perl Pattern Replace filter to find the first line of the current input text and asigned it to a Named Variable. I replaced it with nothing. Then I added an Add Header filter as a subfilter with the SQL Select statement with references to the @named_variable.

Then the SQL Connection was next at the end to execute it.

It took me a while, but it is working.

Thank you.
Post Reply