get data with joins

Hey, i need help, trying to get durabilityDate from the InventDim, i’ve allready draged the table in de data source. Why i did not get my data?? and does i need the joinings? at this possition we are in the salesTable with salesId.

SalesTable sales;
str salesId;

InventTrans inventTrans;
CustPackingSlipTrans custPckSlpTr;
CustPackingSlipJour custPckSlpJr;
PseudoPallet Pseudo;

str result;
;

if (sales.CustAccount == “5555”)

{

select Sales
join CustPckSlpJr where CustPckSlpJr.SalesId == Sales.SalesId
exists join CustPckSlpTr where CustPckSlpTr.PackingSlipId == CustPckSlpJr.PackingSlipId
exists join inventTrans where inventTrans.inventDimId == CustPckSlpTr.InventDimId
exists join dim where dim.inventDimId == inventTrans.inventDimId
exists join Pseudo where Pseudo.WMSPalletId == dim.wMSPalletId;

where Pseudo.DurabilityDate = date2str(result)

result = date2str(InventDim.DurabilityDate, 123, 2, 2, 2, 2, 4);

Exists join will return only the record information from the main table that have a matching record with the joined table.(you will not get data from the joined table)

Try to select the DurabilityDate from inventDim and re frame your query accordingly.