How can we combine two interfaces

How can we combine two interfaces which contains two form layouts of different datatypes. 

Can we create a form of combination of two different table. And when we fill the form can we add values to the database?

  Discussion posts and replies are publicly visible

  • Generally if you want to combine two interfaces you just call both of them as rules like rule!MY_Interface(). One thing to keep in mind is that it's only possible to have one Form Layout in a single interface, so you might need to refactor each of your sub-interfaces to no use a form layout. But to your second question, yes you can have a single form that combines information from as many tables as you want and then insert into the database.

    If you're looking for more specifics on how to set this up, I'd suggest providing some code snippets (please use the Insert > Code for ease of readability).

  • Thanks for replying.

    So, can I combine two tables into single form and use it as a form layout in one interface.

    Could you please tell how to make a single form combining two tables. 

  • 0
    Appian Employee
    in reply to Purvaja

    I'd suggest going through the grid tutorial. If you want to add more than one grid, just drag another grid onto your form. Appian doesn't have any explicit restrictions on components to display on a form - you can add as many as you need.

  • yes, but in my case. 

    interface1 -> create from datatype

    so, this interface1 has the created the form which are in datatype(table1). How can I add another datatype(table2) fields to the same form. Where this form should have all the fields of both data types.

    Can you please give any suggestions. 

  • +1
    Appian Employee
    in reply to Purvaja

    Ah okay that context is helpful that you're using the create from CDT. There's a lot of ways to do this, but I think the easiest way is just to copy the components from one form to the other. To do this, create two separate interfaces and use the create from CDT on each of them.

    Then, in interface 1 add a rule input for the CDT you used in interface 2 by clicking the plus icon at the top right and defining the input to match the name and type from your second interface. Then, in interface 2, you should see in the panel on the right a header that says "Form Layout". Next to that, there are two arrows - click that and select Section Layout.

    Lastly, go into expression mode in interface 2 and copy the entire expression. Then, go back into interface 1 and go to expression mode in that one too. If you paste the full expression from interface 2 right after the line that says contents (it's probably in line 3) and add a comma after what you just pasted it should work.

    Keep in mind that the "Create from CDT" is just a tool to quickly generate a sample form. In most real projects it's easier to add the components that you want and map them all individually. However, the steps above at least give an example for how to combine them using the Create from CDT.

    I'd also highly recommend watching a few of the training courses on academy.appian.com. Those will give you more context for how to build effective forms of any type, regardless of what data you're using Slight smile