Skip to main content

Hi 

 

Has anyone been able to link with sql from inventory transactions to WaDaCo data capture sessions and line sessions and in a simple way. 

I'm using nice label to print off different labels linked to inventory transactions and would like to be able to differentiate from which wadaco config was used to change the nicelabel template and label printed out.

 

thanks 

 

Nick 

Might be hard to do in a single select maybe. I would probably create a server method for that instead.

I’m guessing you are talking about inventory_transaction_hist_tab now?  Its main key transaction_id is only used in one wadaco process (Unissue Work Order), so if you want to find other processes you need to use all the stock record keys and match them with data items in the session line table. So you need some kind of cursor that selects all distinct session ids and then only return something if there is only 1 session id in the result.

SELECT DISTINCT capture_session_id 
FROM data_capture_session_line_tab
WHERE (data_item_id = 'LOCATION_NO' AND data_item_value = location_no_param_) OR
      (data_item_id = 'PART_NO' AND data_item_value = part_no_param_)
-- etc with all stock keys 

Plus it gets a bit tricky since for example LOCATION_NO could be named TO_LOCATION_NO or FROM_LOCATION_NO and PART_NO is sometimes named COMPONENT_PART_NO. If you are interested in catching those processes also.

Not sure if you want to return the process_id or the configuration_id but you can find both in the data_capture_session_tab.