Hi, I have 2 tables with parent/children option enabled:
ventas (parent): id,fecha,vendedor,importe
detalle_venta (children): id,id_venta,codigo_producto,precio,cantidad,importe
When insert a new register in detalle_venta, don't show nothing in the table, and when check in the phpmyadmin, the id_venta is null. For example
ventas:
id=5
fecha= 2015-09-05 18:59:25
vendedor=2
importe=0
detalle_venta:
id=4
id_venta=null
codigo_producto=3
precio=null
cantidad=20
why this happens?
Another thing. I have the field codigo_producto like lookup field and precio like autofill, both from the another table. If I choose one item from the select list of the field codigo_producto, the field precio appears the content of the field from another table, but don't save the price.
I need to save the value of precio in the detalle_venta table too.
Can you tell me how to fix that?
parent/children register
Re: parent/children register
Could you post the AXP project file or send it via a support request to check this issue please?When insert a new register in detalle_venta, don't show nothing in the table, and when check in the phpmyadmin, the id_venta is null.
Lookup fields save only the primary key of the parent record rather than the actual value displayed to users. That's why you see the price displayed, but a seemingly unrelated number stored in the field -- that number is the primary key value.I have the field codigo_producto like lookup field and precio like autofill, both from the another table. If I choose one item from the select list of the field codigo_producto, the field precio appears the content of the field from another table, but don't save the price.

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
- Need personalized consulting on your specific app and customizations? Book an online call with me here.
Re: parent/children register
I sent you the axp project in a support request.
Thank you
Thank you
Re: parent/children register
I'm so sorry for the long delay. We needed some deep investigation of this issue. It turned out to be a bug that caused the lookup field to be left empty if it's a read-only field. We'll work on fixing this in the next release. A temporary fix for now is to uncheck the read-only option for the ID_VENTA field. Please accept my deep apologies for any inconvenience caused by this issue.

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
- Need personalized consulting on your specific app and customizations? Book an online call with me here.