I am new to Flexi Layout Studio and I am using version 11.
I have a scanned document where two numbers are associated in the database: an order-number and a delivery-number.
I am trying to use a WHERE statement in the "search text from database" properties field of the order number element (SearchElements.Kommissionsnrtxt) in order to validate the scanned document with the text captured in the delivery number element (SearchElements.vLiefernummer).
I am able to connect to the database and the WHERE statement works fine if I put in the delivery number element manually.
"SELECT Words FROM WordsTable WHERE Lieferscheinnummer=574738" (works fine)
However, I cannot access the captured delivery number text (stored in SearchElements.vLiefernummer) in the WHERE statement.
"SELECT Words FROM WordsTable WHERE Lieferscheinnummer=vLieferscheinnummer.Value" (does not work)
Below some printscreens.
I have a scanned document where two numbers are associated in the database: an order-number and a delivery-number.
I am trying to use a WHERE statement in the "search text from database" properties field of the order number element (SearchElements.Kommissionsnrtxt) in order to validate the scanned document with the text captured in the delivery number element (SearchElements.vLiefernummer).
I am able to connect to the database and the WHERE statement works fine if I put in the delivery number element manually.
"SELECT Words FROM WordsTable WHERE Lieferscheinnummer=574738" (works fine)
However, I cannot access the captured delivery number text (stored in SearchElements.vLiefernummer) in the WHERE statement.
"SELECT Words FROM WordsTable WHERE Lieferscheinnummer=vLieferscheinnummer.Value" (does not work)
Below some printscreens.

コメント
2件のコメント
The problem you are running into is: Query treats vFieldName.Value as pure text and not as a variable name. Meaning it will look for exact "vFieldName.Value" text in tables instead of variable value.
Here is a solution: you can make a script in Advanced-PreSearch options of required Static Text element you want to fill. This way your DataBase search text will actually be dynamically changed depending on Character String value.
Sample script
string e="SELECT SampleNumber FROM SampleTable WHERE SampleText='"+vInvoiceNumber.Value + "'";
SearchTextFromDB("Your Connection Settings", e, 1000 );
FlexiCapture help has descriptions of both method itself and its arguments so please feel free to use it if you have any concerns.
Please contact me again if you need more help or deeper investigation.
Regards,
Vladislav
Hi,
I am not able to run this successfully.
script executes correctly when hardcoded -
string e="SELECT SampleNumber FROM SampleTable WHERE SampleText='abc' ";
SearchTextFromDB("Your Connection Settings", e, 1000 );
but not able to take value from other search element?
Also, if you could give me query to write in Search Text from database.
Please help me out.
サインインしてコメントを残してください。