Topic Options
#57167 - 07/30/19 10:56 PM Database Query Problem
acezizy Offline
OL Newbie

Registered: 06/12/19
Posts: 4
Hi ObjectifLune User!

i encounter some issue at the "Database Query function".
There are 2 columns of data in the database. a set of record will go thru workflow and write in the database.
->some data will have both of the info filled up.
->some data will only have the first column and will leave the second column empty.

(refer below table.[please ignore the dotted line as it just to make the table nicer])
___________________________________________
|DATA NAME | FIRST COLUMN | SECOND COLUMN |
|ABC_123....|ABC.............. |123..................|
|ABC .........|ABC ..............|......................|


1)data "ABC_123" already go thru the workflow and already write the database with both of the column writen.
"ABC" is the next data, when "ABC" go thru the "Database Query function", it need to check either is there "ABC" in the first column.
if Yes, a script need to capture the second column in the database and write into the local variable for that "ABC" data.
Problem: i unable to find a script that able to capture data from database and write into local variable.

2)data "ABC" already go thru the workflow and already write the database at the first column, and leave the second column empty.
"ABC_123" is the next data, when "ABC_123" go thru the "Database Query function", it need to check either is there "ABC" in the first column.
if Yes, it also need to check either the second column is empty or not.
if the second column is empty, a script need to capture a data from local variable and write into the empty second column.
Problem: i unable to find a script that able to capture data from local variable and write into database.

i hope someone can assist me on this issue. thanks in advance. smile

Top
#57350 - 12/13/19 03:50 PM Re: Database Query Problem [Re: acezizy]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 497
Loc: Québec, Canada
Let me rephrase this:

You need, upon data coming into Workflow, to query the database for the content of column 1 or 2 or both, and then to insert knew record in the database?

Top