Hi all,
I have trouble getting the look up value.
When I look up RM Item from Transfer number, I have item, voucher, avaible qty. I would like to take a voucher corresponding to the RM Item.
Can anyone help me?
*This post is locked for comments
Hi Chaitanya Golla,
thanks for your reply.
I want to retrieve all column values ​​when looking for RM items. when i looked up , i want get value of voucher, Avaible qty
Hi,
Please use the following code in your lookup method(modified your query):
Query query = new Query();
QueryBuildDataSource qbdsJourLine, qbdsBHS;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(InventTransferJourLine), _formControl);
qbdsJourLine = query.addDataSource(tableNum(InventTransferJourLine));
qbdsBHS = qbdsJourLine.addDataSource(tableNum(BHS_MaterialUsedForNewProductJournal));
qbdsBHS.addLink(fieldNum(InventTransferJourLine, TransferId), fieldNum(BHS_MaterialUsedForNewProductJournal, TransferNumber));
qbdsJourLine.addRange(fieldNum(InventTransferJourLine,
QtyReceived)).value(strFmt('(%1 > 0)', fieldStr(InventTransferJourLine, QtyReceived)));
SysTableLookup.addLookupfield(fieldNum(InventTransferJourLine, ItemId), true);
SysTableLookup.addLookupfield(fieldNum(InventTransferJourLine, VoucherId));
SysTableLookup.addLookupfield(fieldNum(InventTransferJourLine, BHS_AvaiableQty));
SysTableLookup.parmQuery(query);
SysTableLookup.performFormLookup();
It generates the following query :
SELECT * FROM InventTransferJourLine(InventTransferJourLine_1) WHERE (((QtyReceived > 0)))
JOIN * FROM BHS_MaterialUsedForNewProductJournal(BHS_MaterialUsedForNewProductJournal_1)
ON InventTransferJourLine.TransferId = BHS_MaterialUsedForNewProductJournal.TransferNumber
Hope this helps you.
Thanks,
Chaitanya Golla
thanks for your reply.
I had the solution. I will use lookup form. I will create ok button when I want to get the current value
This looks like some special customization based off of some customized data that all ready exist. If you want help with this you probably would have to explain more what you are doing... You won't normally have a FG-RM relationship in Transfer journals. That is something that production orders are used for.
You find the relationship between production order in ProdBOM, but ProdCalcTrans can give you insights to actually consumed and estimated item consumption.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156