cancel
Showing results for 
Search instead for 
Did you mean: 

Passing in Two Values - From Database pass

brandonbollin
Active Participant
0 Kudos

I'm trying to pass two values from my source on a From Database pass so a script can evaluate the two. Here's a screenshot that doesn't work but shows what I'm trying to do. Any ideas how to make this work y'all?

Accepted Solutions (1)

Accepted Solutions (1)

brandonbollin
Active Participant
0 Kudos

LOL... Did a search and I knew this problem seemed familiar. This was an issue I had before that was solved under my old SCN ID.

Steffi_Warnecke
Active Contributor
0 Kudos

Did you use a ToASCII pass now or Per's tip with the handling as one attribute through the source?

I even remember that thread. I need to steal some ideas from there (like dropping tables through the pass, because ToDatabase just updates existing tables meaning adding the new entries, but doesn't empty the table first).

former_member2987
Active Contributor
0 Kudos

You got it working from From or To?

Here's the script I just worked out if it's helpful:

// Main function: sample

function sample(Par){

  //Example calling DSE internal function

  //uStop("Terminated by user");

  val = Par.split ('!!');

  uWarning ("First value:  " + val[0]);

  uWarning ("Second value: " + val[1]);

  return val[0] + " is " + val[1];

}

Matt

brandonbollin
Active Participant
0 Kudos

I'm using the To ASCII pass solution like I did last time. I'm doing the exact same thing this time, creating a report so that old solution works perfectly.

I did not use the combining via SQL as Per suggested in my original thread but I might have too. All depends on what the new boss here wants. I miss Per.

former_member2987
Active Contributor
0 Kudos

Sounds good.  Let me know if you have any other questions.

Yes, I miss as well

Answers (2)

Answers (2)

former_member2987
Active Contributor
0 Kudos

Brandon,

I'm not having any trouble doing this in a From or To database pass.

In general you need to pass the two values in the same line with some sort of delimiter - Error_Message!!TaskStatus

Then in your script process it as

val = Par.split ("!!");

Then you can reference the parts as an array of val.

I only tested the populating of the attribute, I did not try the script part.  However I seem to recall an issue with scripts and From Database passes.  I'll take a more detailed look.

Matt

Steffi_Warnecke
Active Contributor
0 Kudos

Hello Brandon,

can you elaborate on the "doesn't work" part? Do you get errors? Nothing?

Regards,

Steffi.

brandonbollin
Active Participant
0 Kudos

Right now I get nothing. I've tried:

Error_Message!!Task_Status

Error_Message"!!"Task_Status

"Error_Message"!!"Task_Status"

The first two pas nothing into the script and the third one passes in the actual wording:

Error_Message"!!"Task_Status

I used: uWarning("Value of Par: " + Par) to show me the above line.

Steffi_Warnecke
Active Contributor
0 Kudos

So no %% around the attribute names?

I mean something like:

%Error_Message%!!%Task_Status%

brandonbollin
Active Participant
0 Kudos

Not in a From Database pass. That would work in a To Database pass but isn't accepted here.

Steffi_Warnecke
Active Contributor
0 Kudos

Hmmm... I don't have my system in front if me now, so I'm trying to remember by heart. Doesn't work so good, does it. ^^

Maybe Matt comes back with better news.

former_member2987
Active Contributor
0 Kudos

Yeah IDM is interesting that way