Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Using two forms in one tab

    Hi!

    I am currently using 2 datasources to pull from tables A & B. Table A has fixed number of fields and Table B has dynamic fields. Table B has been defined with "FieldName" & "Fieldvalue" as the fields. I am trying to combine two datasources to create one form. Is it possible to create a DynamicForm with a datasource populating fixed fields from table "A" and then append fields dynamically using data from table "B".

    How could this be accomplished? Please advice and thanks in advance.

    Ramjee

    #2
    Take a look at this example, showing how you can layer presentation fields onto the set of fields provided by a DataSource. If you add some JavaScript code that dynamically generates form.fields, I think this solves your problem, right?

    Comment


      #3
      Hi!

      Thanks for the response. Actually I have one table "Item" which is used by an itemDataSource and another table "Attributes" which is pulled by another datasource attDataSource. I am trying to use one datasource which pulls data from both the tables via a stored procedure (using webservice) and populate one form.I am trying to eliminate the current setup of having 2 datasources, 2 forms and 2 read-write functions. There are separate script for creating one form for each table. This setup currently is causing issues when the second form is trying to save changes back to the database. Hence the need to have one single form and datasource to read and write back to the database. The fields in the second table are dynamic.

      Please let me know what would be the recommended solution. Thanks in advance.

      Comment


        #4
        If you are trying to edit two tables as though they are one, create a single DataSource for them. The UI can simply interact with this single DataSource and never know there are two tables in the underlying DataSource. The fields of this single DataSource can be dynamically generated based on the contents of the Attributes table.

        Comment

        Working...
        X