Skip to Main Content

Set values in Tabular Form with Dynamic Action?

Fractal65Nov 19 2014 — edited Nov 24 2014

Hi, I need help with my first Apex Application, please. This page is for fuel truck users who buy many gallons of fuel, and use this page to distribute that fuel among many projects. These users are familiar with filling out the Transaction Date, Site, Fuel Type, Tank #, etc on the top of the page, and then using the rows below to split the fuel into different projects.

Example: The user gets 100 gallons delivered, fills out the Page Items on top with purchase details, and then uses 3 rows of the Tabular Form to distribute it among 3 projects (Project1 gets 20 gallons, Project2 gets 30 gallons, Project3 gets 50 gallons). Each row of the Tabular Form inserts a new record in the Fuel database table with different values for Gallons and ProjectID, but the same Site, Date, Fuel Type, and Tank values.

Thus, there are hidden columns on the Tabular Form for Site, Date, Fuel Type, and Tank. They need to get these values from the top so that the user doesn't have to type them in repeatedly. This is my problem: how can these hidden columns get the values from the top text boxes dynamically? It should be dynamic, or changed immediately if the user changes anything in the top boxes (like a typing error).

Just going to each Tabular Form column and setting the "Tabular Form Attributes" to Default to an Item, and then setting the default to the name of the page item text box will only work if the user somehow submits the page and doesn't make any typing mistakes before filling out the tabular form. I need it to be set immediately. Also, is there something special to set the Date Picker on the tabular form to the value of the Date Picker on top? At the moment, I'm trying to use the Set button to assign the values in the top boxes to their Items, and refresh the page, so the Tabular column defaults can be right. Is there a better way to do this? It doesn't work for the date picker.

I've just started using Apex, I only know the basics of the Dynamic Action GUI. If I should use a jQuery, or code in the HTML header, or an Apex "Collection", please be very specific. The Page Items on top have names like P13_TANK and the Date Picker P13_TRANSACTION_DATE, and the tabular form has column names like TANK and TRANSACTION_DATE. The truckers and I appreciate any help, thanks!

apex question.png


Post Details
Added on Nov 19 2014