POPULATE VALUE IN SUBFORM

Questions related to customising nuBuilder Forte with Javascript or PHP.

POPULATE VALUE IN SUBFORM

Postby sadibou » Wed Dec 05, 2018 2:58 am

Hello,
I currently have a subform and I would like to automatically display (like default value) the 'PU' from (temporary Table) in 'Prix Unitaire' as soon as I choose an article by lookup from 'ARTICLE' in (temporary table).
and also check the quantity entered if less than or equal to the quantity in stock (<= 'SOLDE' in temporary table).

I need help :?

I tried with this --> nuSetFormValue('des_prix',nuLookupRecord()->PU); but the field 'Prix Unitaire' still blank
Attachments
Image1.png
Image1.png (156.97 KiB) Viewed 61 times
sadibou
 
Posts: 5
Joined: Sat Nov 24, 2018 8:24 pm

Re: POPULATE VALUE IN SUBFORM

Postby admin » Thu Dec 06, 2018 6:03 am

sadibou,

In the Javascript part of your Lookup you'll need to run

Code: Select all
$('#des_prix').change();



Steven
admin
Site Admin
 
Posts: 2971
Joined: Mon Jun 15, 2009 9:53 am

Re: POPULATE VALUE IN SUBFORM

Postby sadibou » Fri Dec 07, 2018 5:36 pm

Thank you Steven,

But I think it's the temporary table that does not return information that's why the field is blank.
Is there any other way for me to retrieve the data from the temporary table and use it in the sub form ?

Sadibou
sadibou
 
Posts: 5
Joined: Sat Nov 24, 2018 8:24 pm

Re: POPULATE VALUE IN SUBFORM

Postby sadibou » Sat Dec 08, 2018 9:21 pm

Hi,

It works now. I just had to use the article table in the lookup and recreate the temporary table in the new session.

Sadibou
sadibou
 
Posts: 5
Joined: Sat Nov 24, 2018 8:24 pm

Re: POPULATE VALUE IN SUBFORM

Postby admin » Sun Dec 09, 2018 11:35 am

.
admin
Site Admin
 
Posts: 2971
Joined: Mon Jun 15, 2009 9:53 am


Return to Custom Code



cron