New Action: Add a Row to a table

Hi Simon, here’s how to model this:

  1. Define an action on TableB that copies a row over to Table C
  2. Define a “reference” action on TableA … it identifies a set of rows in TableB and for each of them, invokes an action (the one you defined in step 1) on that row
  3. Now trigger the reference action via a workflow rule with the matching condition.
2 Likes

Hi Alex, here’s how you would achieve that.

  1. have a separate Details_Template table with five dummy rows in it, one for each of the choices.
  2. Define an action on this Details_Template table to copy a row into the Detail table
  3. Now define an ‘reference’ action on the Master table … this defines an expression that identifies a set of rows in the Details_Template table (those whose name matches something in the enum list column of the Master row) and invokes the copy action (defined in Step 2) on them
3 Likes

Combine this new kind of action with a reference action.

In a reference action, you provide an xpression to compute a set of row references. And an action to take on each of those rows. If you invoke an action that creates a new row in another table (effectively a “copy”), then it achieves what you want, I think.

3 Likes

Great, then i dont need to struggle with API and testing on Postman !!! This will save massive time.

1 Like

Love you guys! I’m a med student who doesn’t have much time to tinker with webhooks and this is going to make my med app dreams come true!

3 Likes

I tested this and working perfect. Thank you for implementing this awaited feature!

On the backend, API POST call should be running. POST methods could be relatively simple rather than Update row(s), but does your team have a plan and roadmap to introduce similar for the other verbs , especially, update!

2 Likes

… Including HTTP GET

1 Like

Very true, thank you.

Thank you for that new feature.
I used a form with EnumList. After saving, every item in the EnumList gets a new row in the child table. That will help us speed up the processes.

8 Likes

@Fabian. Can you guide us through the steps how you did this please. This is awesome functionality
BTW how do you get the Enum to pop up after clicking in that Action? :wink:

@Henry_Scott
Use of LINKTOFORM deeplink with that action and activating “Advance Forms Automatically” property from UX > Options > Forms produces the result

2 Likes

@LeventK, thank you, let me try that out

Hmmm… It seems that some initial values are not being calculated when you create a record via this new mech.

App formulas are calculated, the columns that are set with the data action are set - but all initial values aren’t evaluated, some are simply missed.

@praveen
App: TTGamma-96620
Version: 5.102072
Table: Line_Items
Columns: LineItem_Title, LineItem_Rate

Action (on the Invoices table) that creates the Line_Item row:
Create | Auto Invoicing Item
CloudApp
When pressing that button, there’s an initial value formula to set the title - which is dependent on values set by the action - but you can see there’s nothing being written.

The action creating the record set’s what is being created, then initial value formulas pick that up and set titles, descriptions, hourly rates, etc. based off that data; but it seems that any value written to the record by this feature isn’t “seen” by the initial value formulas.

1 Like

@Fabian

I need this in my life - would you be able to do a quick video walk-through of how you set this up? Would be very grateful!

Upon further investigation I think I’ve nailed down what’s going on. @praveen

It seems that values set by this new action are not available to initial value formulas.

Let me explain my testing setup: I’ve got an action to make a new row like this:
CloudApp
where the week number and year are populated by the action.

I’ve got another column that’s a concatenation of these values
CloudApp
To give us a nice looking label like:

Week 34 (2019)


When I run this action, this is what I get for my initial value:

CloudApp

The numbers supplied by the action are not included in the initial value formula result.

But when I change the year formula so it’s hard-coded to 2019
CloudApp
That value is included in the initial value concatenation - but the value set by the action (the week number) isn’t.
CloudApp

2 Likes

Sorry for my late response.
Because of my bad English, I was not brave enough to make a video :slight_smile:
I just did a sample App to show how to turn an Enum into Children.

https://www.appsheet.com/samples/Sample-App?appGuidString=485bc2e2-f1b8-4357-b822-50c27ef99b99

There are 2 ways:

  1. In the Table “Standard Items” you can select 5 Items and the Amount.
    When you create an Order you define also the Category.
    Then you can click on the Action “Standard Items” and it will add the Items you selected in the Table.
    PRO: You can define the Amount.
    CONTRA: You have to pre-define the items.

  2. After you created an Order you can click on the Action “Enum”. This will open a Form. This is just a Helper Table. You can select max 10 Items. After selecting the items, the Form gets saved because it is Auto save. The Event Action of this Form is “Enum Items” which is an Action that groups 10 Actions: Adding all selected Items als Children.
    PRO: You can select the items.
    CONTRA: The Amount is always the same.

6 Likes

Thanks @Fabian this is excellent!

Checking it out now

1 Like

Hey Fabian

This solution is really nice! It works great!

There’s a slight drawback in the fact that the selection of items is limited to the amount of “actions” you’ve got in the back end (the ones that are part of that grouped “Enum-list” action)

It will obviously be annoying for the users of the app to refer to their developer every time they add a extra grouped item.

Other than that - It’s a very nice approach! :+1:

1 Like

@Jon_S You are right. It’s up to you how many actions you want to group. 10, 100, 1000 :slight_smile:

2 Likes

Thanks for your great work Fabian!

2 Likes