Good afternoon,
I am working on customizing the Inventory Transfer Form using Application Studio. My goal is to have two buttons on the form in the From and To sections. The buttons are to replace the functionality of the search icon in the bin fields.
When I click the From Bin button, I run a BAQ called BinList to get a list of all the bins that have some parts in it. I use search-show, and search-value-set to set the fields in the form based on what the user chooses from the search screen. In particular I have three search-value-set widgets. One for bin, lot, and bin description. These work well. I set the search-value-set widgets to use the actionResult. This seems to pull in the right data.
When I click the To Bin button, I want to perform a similar operation to the one I described above. Except that I want to run a different BAQ called BinListWarehouse. This will list all of the bins in a warehouse, and will list any on hand quantity for the part entered. This way, someone can choose to transfer the parts to another bin where there are already parts, or choose another bin in the warehouse where there are not any parts. I attempted this by using the same process as above with a search-show, and several search-value-set widgets. However, when I choose a bin, the actionResult keeps return a row from 4 rows below the one I choose in the search. I can’t explain this with debugging.
Everything looks as if I legitimately choose the row 4 rows below my chosen row. This obviously returns the wrong bin and description to the form.
My questions is, am I using actionResult correctly? Do I need to clear or reset it somehow between search-shows?
BAQs For Reference:
BinList
select
(str(WhseBin.Fullness_c * 100) + '%') as [Calculated_RealFullness],
[WhseBin].[Fullness_c] as [WhseBin_Fullness_c],
[WhseBin].[Description] as [WhseBin_Description],
[WhseBin].[WarehouseCode] as [WhseBin_WarehouseCode],
[WhseBin].[BinNum] as [WhseBin_BinNum],
[PartBin].[OnhandQty] as [PartBin_OnhandQty],
[PartBin].[LotNum] as [PartBin_LotNum],
[PartBin].[PartNum] as [PartBin_PartNum]
from Erp.PartBin as PartBin
inner join Erp.WhseBin as WhseBin on
WhseBin.Company = PartBin.Company
and WhseBin.WarehouseCode = PartBin.WarehouseCode
and WhseBin.BinNum = PartBin.BinNum
where (PartBin.PartNum = @Part)
and (WhseBin.Fullness_c is not null)
BinListWarehouse
select
(str(WhseBin.Fullness_c * 100) + '%') as [Calculated_RealFullness],
[WhseBin].[Fullness_c] as [WhseBin_Fullness_c],
[WhseBin].[Description] as [WhseBin_Description],
[WhseBin].[WarehouseCode] as [WhseBin_WarehouseCode],
[WhseBin].[BinNum] as [WhseBin_BinNum],
[SubQuery2].[Calculated_HaveOnHand] as [Calculated_HaveOnHand]
from Erp.WhseBin as WhseBin
left outer join (select
[PartBin].[PartNum] as [PartBin_PartNum],
[PartBin].[BinNum] as [PartBin_BinNum],
(sum(PartBin.OnhandQty)) as [Calculated_HaveOnHand]
from Erp.PartBin as PartBin
group by [PartBin].[PartNum],
[PartBin].[BinNum]) as SubQuery2 on
WhseBin.BinNum = SubQuery2.PartBin_BinNum
and ( SubQuery2.PartBin_PartNum = @Part )
where (WhseBin.WarehouseCode = @Warehouse)
and (WhseBin.Fullness_c is not null)
Thank you for your time!
Nate