Hi there !
I have a โdeckโ from which the user can select based on a photograph and a brief description of a package, that is, a group of records from that same table, which make up a promotion, (could be more than 15) and I would like to โselectโ that record from the deck the emptying of records from the package table is generated (selected package) and the new records are generated in the inventory movement table, however โฆ
things that I didโฆ
I select the โACTIONโ that I put in the deck and it is generated but only the first record of the package in the inventory movement table, it does not do it with all records of the package โฆ
try to do it with a workflow, when modifying something in the registry, however I can only generate one registry in my inventory movement table, the one that I modify myself, but I need to do the same with all the registries that make up the package !!!
During the night, I have โREPORTSโ that are executed automatically and that generate records, in this case assortment orders according to the sales of the day โฆ
How to make a report run whenever I want โฆ? when selecting a record, when marking it, with an ACTION
And to read only the marked records to generate the new ones in the inventory movement table?
This third is I think the one that is closest to what I need, but Iโm stuck, any ideas?
Thank you all for reading and your comments โฆ
Solved! Go to Solution.
Your formula for the โAdd more rowsโ action should be targeting the Inventory table.
select(Inventory[Item ID], [PAQ ID]=[_thisrow].[PAQ ID])
[PAQ ID] is the column from your Inventory table
[_thisrow].[PAQ ID] is the column from your PAQ table.
This formula produces a list of rows from the inventory table. AppSheet then executes the Action: โAdd one rowโ on each row in the list.
Just to check my understanding:
You want the user to select a record from a deck view that represents a group of items in a promotion; this promotion is a single record in the same table with multiple items. When they click on that promotion, the app should copy all items in that promotion to an inventory movement table.
I think the missing piece is you need to consider the Action: โData: Execute an action on a set of rowsโ.
Create an action: โData: โadd a new row to a table using values from this rowโ and associate it with the promotions table. This will copy a item from the promotions inventory movement table. (Note this simply is an action that can copy a row from one table to anotherโ
Create an action: โData: Execute and action on a set of rowsโ, which would be associated with your promotions table, and the โreference tableโ is the promotions table as well. The formula you enter should be a select query which pulls up a list of Primary Keys relevant to that promotion in the promotions table. Then the referenced action will be the action created in step 1.
At this stage you have created an action that you can show for any promotion item. When the action is triggered it will look up the list of items that are relevant to that promotion and apply the copy action to each of those items from the promotion table to the inventory movement table. You can attach this action to a workflow or form save event as well to get the desired behavior.
@Rich Thanks for your guidance and such a good explanation โฆ
I found this article that @steve made very detailed too โฆ
I did what you suggest me in the app Iโm working on and I couldnโt get it to work, I thought it was something in the app, that it was making this hard to work and I made a new app with just two tables so there would be no other things that interfere.
In this new app, I have not been able to make it work either โฆ
It is the same idea, two tables, one with the PAQ promotions and the other with INVENTORY inventory movements.
It only generates one record in the INVENTORY table, where it should generate all the records that belong to that promotion [PAQ ID]
When editing in the PAQ_form form, where I put (I also tried it with APPEARANCE display prominently)
For each row to add, do this โฆ
Add more rows
And when editing with the form, it will be very useful for me when you want several promotions, but the PAQ_form form always puts zero in QTY โฆ
https://www.appsheet.com/Template/AppDef?appName=addrows-261468&quickStart=False#Manage.Author.TeamW...
If you cannot see the app, please notify us to correct what is needed ,
I will greatly appreciate your help โฆ
I send you photos and I share the app, the tables are google drive are already shared โฆ
Your โadd one rowโ action should be for the Inventory table and copy to the the same inventory table.
The action โAdd more rowsโ reference should be the Inventory table. This tells the where to to target. Logically this means:
Then AppSheet executes the add one row action to each record that is calculated from the Referenced rows formula.
You do not need the grouped action called โfor each row to add do thisโ.
On form save just trigger the โAdd more rows actionโ
thanks for your prompt reply @Rich
I did a lot of tests based on what you say (and what I knew) and now I am more confused โฆ I think that something in the translation I do not understand โฆ or there is a bugโฆ
I will put into words and the same is the app that I modify according to what I understood from your instructions โฆ
the ACTION โโ for each row to add do this โฆ "will not be needed, delete it โฆ
On form, i save just trigger the โAdd more rows" โฆ action โ
On Action "Add more rowsโ Data: add a new row
in reference table, remove PAQ and put INVENTORY
For a record of this table- remove PAQ and put INVENTORY
On Action โadd one rowโ Data: execute an action on a set of rows
in -This table- remove PAQ and put INVENTORY
It could be โreference rowsโ ? (i tested with some and nothing)
select(PAQ[_computedkey], [PAQ ID] = [_thisrow].[PAQ ID])
As I said before, I am more confused, please help!
It does not generate a single record, and I am in doubt โฆ
To generate the new record (point # 3) where you will get the values โโthat are in the PAQ table like the [PRICE] [DISCOUNT] and [QTY], I would suppose I would put them in [CTD] = [QTY], but โฆ ?
the above has to do with this โฆ
When the client wants several promotions, he could put how many in the PAQ table !
how would it be done!
Your formula for the โAdd more rowsโ action should be targeting the Inventory table.
select(Inventory[Item ID], [PAQ ID]=[_thisrow].[PAQ ID])
[PAQ ID] is the column from your Inventory table
[_thisrow].[PAQ ID] is the column from your PAQ table.
This formula produces a list of rows from the inventory table. AppSheet then executes the Action: โAdd one rowโ on each row in the list.
Thx, it works !
User | Count |
---|---|
42 | |
29 | |
25 | |
23 | |
13 |