Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

POPULATE VALUE IN SUBFORM

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Locked
sadibou
Posts: 5
Joined: Sat Nov 24, 2018 11:54 am

POPULATE VALUE IN SUBFORM

Unread post by sadibou »

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
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: POPULATE VALUE IN SUBFORM

Unread post by admin »

sadibou,

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

Code: Select all

$('#des_prix').change();

Steven
sadibou
Posts: 5
Joined: Sat Nov 24, 2018 11:54 am

Re: POPULATE VALUE IN SUBFORM

Unread post by sadibou »

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 11:54 am

Re: POPULATE VALUE IN SUBFORM

Unread post by sadibou »

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
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: POPULATE VALUE IN SUBFORM

Unread post by admin »

.
Locked