Hello
I have two fields under consumables that are look up fields from inventory. Both fields cross reference each other. One is a bar-code ITEM field, one is a manufacturing part number field. How can I lookup MFG P/N field or bar-code field and auto fill one or the other from lookup?
Thank you in advance.
dual field lookup from links
Re: dual field lookup from links
I have two fields i need to populate based on the information placed in one of the two fields.
Consumable_Tools
Item:
MFG_Part_Number:
Both fields are important and need to be cross referable. If I scan a bar code one of two numbers comes up. Item number is often a bar code number and not the part number. The part number is how everyone orders the tools. If i have only the part number and not the item number how do i populate the item number. Hope this makes my question a little more understandable.
there is only one item number per part number and only one MFG_Part_Number per item number.
Thank you!!!!
Jim
Consumable_Tools
Item:
MFG_Part_Number:
Both fields are important and need to be cross referable. If I scan a bar code one of two numbers comes up. Item number is often a bar code number and not the part number. The part number is how everyone orders the tools. If i have only the part number and not the item number how do i populate the item number. Hope this makes my question a little more understandable.
there is only one item number per part number and only one MFG_Part_Number per item number.
Thank you!!!!
Jim
Re: dual field lookup from links
1) On save you can use TABLENAME_before_insert() function in hooks/TABLENAME.php to get the other value from database and fill $data
2) if you want to read the other value immediately after barcode scan or input, you can use $j.ajax(...) in TABLENAME-dv.js to call a server side php script. Pass the existing value from $j("fieldname1").val() to the server script, in php get missing value from DB, return both values as JSON back to client and put the values into your input fields using $j("#Fieldname1").val(data.value1); for example.
Regards,
Jan
2) if you want to read the other value immediately after barcode scan or input, you can use $j.ajax(...) in TABLENAME-dv.js to call a server side php script. Pass the existing value from $j("fieldname1").val() to the server script, in php get missing value from DB, return both values as JSON back to client and put the values into your input fields using $j("#Fieldname1").val(data.value1); for example.
Regards,
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: dual field lookup from links
Thank you for the reply, I would love to say i know what your talking about but that would be a lie. I am learning the hard way by failing over and over. Is there any way to break that down to laymen's terms? I build these computers and support them not program them. thank you for all your help