Insert value from main table into "Allow add

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mpol_ch
User
Posts: 877
Location: Switzerland

Insert value from main table into "Allow add

Post by mpol_ch »

Hi,
How can i auto insert the value from main table into allow add?
I have a table with lookup link and activated option "Allow add".

Main table field=Nr with value MLJ33
Allow add table field=Ref

When I click + sign (Allow add) then I want to have in Ref "MLJ33" inserted.

Any idea?

mpol_ch


arbei
User
Posts: 9286

Post by arbei »

It is not supported to pass the value to the "Add option" dialog box.


kirondedshem
User
Posts: 642

Post by kirondedshem »

Ive tested that the Allow add option still uses the field settings->default add value if set. So create a function in global code to auto determine what value to set during allow add, then put the function as the default add value for the ref field in field settings. Now the ref field will have that value during every add form to the main table as well as during allow ad option.

If the value to set in ref field is somehow dependent on the add form in which the allow add option si called then maybe save any values you need in a session and then use the session values to auto determine the value you need.


Post Reply