ACTION: **Open a form to add a new row to another table using values from this row**

ACTION: Open a form to add a new row to another table using values form this row

Currently, the only actions available that are related to this are:

  • Open a form to add new row to this table
  • Add a new row to another table using values from this row

Limitations of the available actions:

  • Open a form to add new row to this table* can only add to the current table
  • Add a new row to another table using values from this row will not work if all the required columns of the other table is not assigned

Currently available solution:
Use Open another view within this app action and utilize the LINKTOROW() deep link expression. See sample below:

USE CASE:
Although this is possible using the given solution above, adding this as a readily available action will make it more intuitive for developers.

An example situation is that if the current table doesn’t have all the needed columns to supply to all the required columns of the other table.
By allowing to open a form first (instead of adding to row of the other table directly) will allow the app user to supply required information of the other table.

With this feature enhancement, a UI will be presented to the developer.

The screenshot above is for the Add a new row to another table using values from this row action. I am requesting for that same UI but instead of adding to the destination table directly, I want to open a form to allow user to make a few more edits before saving it to the table.

And no, adding to row then opening the form can’t work because that’s assuming that the row has already been added successfully before being able to open the form to edit that record. As mentioned, the user needs to supply some required fields that is not available form the current table 1’s row.

Status Open
12 19 2,928
19 Comments
BigBadWol
New Member

How i can use LinkToForm in case, when user want to manually supply some fields?

Steve
Platinum 4
Platinum 4
Status changed to: Open
Pratyusha
Community Manager
Community Manager
 
DMA2022
Bronze 5
Bronze 5

I understand, appreciate and agree with the OP's initial request. LinkToForm adds another step, I think, so please let me share my use case here, in case there is a simpler way.

I have a table called People. It is related to another table called Companies. 

When I'm creating or editing People, I want to select a related Company. In the People form, there's a field that references the list of existing Companies, so it's easy to select and link the two.

However, if the Company does not exist yet, my current option, while in that Companies list, is to Add New and enter the Company name only. That creates and links the new Companies record to this People record, but the new Companies record is missing the other information. I would like to create the entire Company record at once the first time, but I cannot. I understand this to be the OP's feature request, and it is both what I want and expect in a form based on related tables.

In the interim, it appears that I could construct a deep link as a separate field in the form. Then, if the Company doesn't yet exist in the dropdown field, I would exit that field and go to the next field, called "Add New Company." That would open the Companies form, let me create it, and link it back. 

Two questions from here:

1) Am I understanding the best workflow for adding a deep link to my form?

2) Is there a simple way to return my user to the same location in the People form to continue completing that form after creating the new Company?

3) Does the Company immediately appear in the People form, or would that require a refresh?

Thanks for any thoughts.

-------

UPDATE:

I abandoned the LINKTOFORM solution because it cannot be accessed via the Form view. It's not intuitive for my users to complete a form in Edit view then go to Detail view to complete a different form for the related record.

I created a hyperlink to prepopulate the related record with the initial record's data. I used a Show type field, set it to URL category, then constructed a hyperlink concatenating the app link and LINKTOFORM query variables. I now can place that "Add New?" hyperlink field right under the dropdown. It then passes the record ID into the new record. 

Then I wrote an action to pass the newly created record's ID back to the link field in the initial record. I set that to invoke on Form Save.

This took a lot of testing and figuring things out, but it finally works.

------------

SOLUTION:

Coming back with the extremely simple solution having discovered my error in structuring the table, just in case anyone else isn't able to "Add New" in an EnumList set to a Ref table. 

I have a number of fields that link to other fields in a many-to-many relationship. I needed a field to select linked records that would allow me to "Add New" records if a needed record didn't yet exist. I could see "Add New" in my dropdown (single select fields), but it only populated the name field and I needed to add all of the other fields to the new record, as well.

My multi-select fields were built using EnumLists with Ref base type. When I'd click on those fields, I could select multiple existing records and link them all. But I didn't see an Add New option here. 

At first, I built deep links and actions and ultimately rigged together something that worked, just not elegantly or awesome for the UI.

Then I remembered that I'd initially not been able to see all of the records in the EnumList Ref table until I'd read the tip to set Valid_If = Filter(Table,TRUE). It was that restriction that removed "Add New" from the EnumList field in the form. I just moved the same filter to "Suggested Values" instead, and now I see "Add New" and can create complete new linked records from within the form view.