Variable Name within a variable name??

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
steveh
New Member Send Private Message
Posts: 2
New Member
Hi all,

   New to process flow and already running into my first issue :)  I have a SQL call from SQL integrator node to an oracle database.  The schema is being passed in as a variable, so the query is using this variable... but when I get the results from the query back and try to use them in a message builder, I get undefined.. my guess is because the variable name ends up as .Table.Data> I have tried using AS in the select, but that just appends that to the variable name listed above.  Does anybody know of a way around this issue?  Thanks in advance!
Shane Jones
Veteran Member Send Private Message
Posts: 460
Veteran Member
If I am understanding you correctly I think you are seeing an issue in the way process flow shows a variable name in its list of variables. Sql queries show output like this:

node_table_field
(however us use it like this: node_field)

You will just want to change what you use to declare the variable even though process flow gives you a list of variables... Usually you just drop the "table" from variable name unless your query has two fields with the same field name. If a field is duplicated you use AS in your "select" to rename the variable.   For example: 

AS empno

You would just type your variable like this when you want to use it:

Node_empno

Process flow may still show it in a list like this "node_table_empno" but that will not work.
Shane Jones
Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
** Teach others to fish...
steveh
New Member Send Private Message
Posts: 2
New Member
Interesting... I will give that a shot... when I tried to do an AS before, and I got something really funky but I will try to access with this alternate approach. Here is a better example of what I am running into...

Query Node = OracleQuery

Query = SELECT .Table.Field1.. etc

So.. Variable ends up coming out as .Table.Field1> and when you try to use this, it is terminating the variable like so.. gives undefined and then I get the rest, .Table.Field1 as a literal string in say a message builder or email.

Before when I tried AS, the variable name came out like so.. .Table.Field1 AS F1>.. so you are saying that I should be able to access as ... right?