Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
Can I do this in script?
I do not know how to compare ID in external query to internal ID..
SELECT proj_st.id, proj.id,ERP_Primary_Key AS ponumber,NAME AS action_name,users.nick approver_name,proj_st.status,start_date,end_date,real_end,
po_approvals_decisions.decision, parent
FROM proj JOIN proj_st ON proj.id=proj_st.proj_id LEFT JOIN users ON employee_id=users.id
LEFT JOIN po_approvals_decisions ON proj.id=po_approvals_decisions.poid AND proj_st.employee_id=po_approvals_decisions.user
AND DATE(real_end)=DATE(updatetime)
WHERE ERP_Primary_Key='8030742' /*M3 PO*/
AND employee_id>100 /*Without system users*/
and proj_st.id in
/* get only last approver*/
(select max(proj_st2.id) from proj proj2 JOIN proj_st proj_st2 ON proj2.id=proj_st2.proj_id where proj2.id =proj.id and employee_id>100)
and exists
/*get only approved orders*/
(select 1 from proj proj2 JOIN proj_st proj_st2 ON proj2.id=proj_st2.proj_id where proj2.id =proj.id and
employee_id<=100 and proj_st2.parent=33 and proj_st2.status=0 and proj2.id=proj.id)
Regards,
Luka
@Luka1615 Have a look at the following Design Blog post, believe that may point you in the right direction, but I am not sure, you may need to further clarify things if not:
https://community.qlik.com/t5/Qlik-Design-Blog/Preceding-Load/ba-p/1469534
If you want to search the Design Blog area further, use the following link:
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Regards,
Brett