This topic is locked

Mandatory field based on master table field value.

1/2/2022 5:14:33 PM
PHPRunner General questions
G
gcr author

Hi,

i have a master(sale) table and child(cheque) table.
there is a field: cheque qty in master table.

if value of cheque qty in master table is >0 than all fileds in child(cheque table) to be made mandatory else optional.
how can we acheive this. can someone help with formula?

Thank you

fhumanes 1/3/2022

As an inspiration, read this article to delete attributes "isRequired".

https://xlinesoft.com/phprunner/docs/ctrl_removevalidation.htm

Greetings,
fernando

G
gcr author 1/4/2022

hi,

thanks for the reply.
but i was wondering how to get master table field in child table javascript onload events page.
can you help me with the code. thank you

fhumanes 1/4/2022

Hello,

I need a lot of information than you want to do. I am assuming that you are pushing the information from the master table and that you are then editing the records of the child table.

One of the ways is to use "proxy" variables that you upload from the server to the JavaScript interface. See this article: https://xlinesoft.com/phprunner/docs/setproxyvalue.htm

You can also read an item and example that I wrote to synchronize data between the master table and the records of the child table.
https://fhumanes.com/blog/guias-desarrollo/guia-7-phprunner-sincronizar-actualizacion-entre-maestro-y-detalle/

Greetings,
fernando