- Posts: 13
Preventing Lookup to Fail
- Heinz
- Topic Author
- Offline
- User
Less
More
10 years 7 months ago #2317
by Heinz
Preventing Lookup to Fail was created by Heinz
Hi there,
I use a Lookup function in my script, but when it fails (so it does not find a value) the entire process stops.
To try and prevent this, I though of using a SQL function that does a count of the number of items that would match the lookup, based on the same input value on the record.
SQL: SELECT COUNT(*) AS totalFound FROM wscalllog WHERE leadid = 1
I then send that to a IF / THen ELsE and filter if the value = 0, thus, if no value will be found, the record should be ignored.
Everything seems ok, but when I run the script, I get a "The adapter does not support the Execute function - and it then shows the SQL with a parameter replaced?
I also include my script, but modified it to remove the MySQL password - but I can not provide valid test data since its contains cleint info, but I am sure you will be able to figure out what I am after.
I use a Lookup function in my script, but when it fails (so it does not find a value) the entire process stops.
To try and prevent this, I though of using a SQL function that does a count of the number of items that would match the lookup, based on the same input value on the record.
SQL: SELECT COUNT(*) AS totalFound FROM wscalllog WHERE leadid = 1
I then send that to a IF / THen ELsE and filter if the value = 0, thus, if no value will be found, the record should be ignored.
Everything seems ok, but when I run the script, I get a "The adapter does not support the Execute function - and it then shows the SQL with a parameter replaced?
I also include my script, but modified it to remove the MySQL password - but I can not provide valid test data since its contains cleint info, but I am sure you will be able to figure out what I am after.
Attachments:
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
10 years 7 months ago #2318
by FlowHeater-Team
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Replied by FlowHeater-Team on topic Preventing Lookup to Fail
Hi Heinz,
The solution for your inquiry is quite easy, you just have to switch in the SQL Heater the side where the SQL statement should be executed. The Excel Adapter currently doesn’t support the Data Lookup functionality.
But it should be a easier way to use just one SQL Heater instead of the Lookup Heater . Note: The Lookup Heater is outdated because the SQL Heater is more flexible.
I’ve modified our FlowHeater Definition. I’ll think it should be clear how it works.
The solution for your inquiry is quite easy, you just have to switch in the SQL Heater the side where the SQL statement should be executed. The Excel Adapter currently doesn’t support the Data Lookup functionality.
But it should be a easier way to use just one SQL Heater instead of the Lookup Heater . Note: The Lookup Heater is outdated because the SQL Heater is more flexible.
I’ve modified our FlowHeater Definition. I’ll think it should be clear how it works.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Attachments:
Please Log in or Create an account to join the conversation.
Time to create page: 0.261 seconds