How to remove duplicate rows leaving only the first row added

Hi everyone!
This app is made for flower industry
Not sure what is the best way to achieve my goalโ€ฆ
a little contextualization:

Variedad= flower type
Cama= Bedโ€“>where the flowers are planted ( in one โ€œcama/bedโ€ can be planted diferent type of flowers)
Bloque=BLock= Group of beds

i have a table called โ€œEntrada postcosechaโ€ where all the flower that is cut each day related to the block and the bed is registered

i need to know on what date each variety began to be cut from each bed and block,

so i need to take the first row registered of each variety, bed and block (from table โ€œentrada postcosechaโ€ and print it on another sheet called โ€œinicio de corteโ€ where the date where the cutting of each variety began in each block and bed is stored

but i donยดt know what can be the filtering condition for the main table โ€œentrada postcosechaโ€

Thank you very much!

0 9 271
9 REPLIES 9

Your filter for the records for the minimum date could be

IN( [Key Column], MINROW(โ€œentrada postcosechaโ€, โ€œDate Columnโ€, AND([Variedad]=[_THISROW].[Variedad] , [Cama]=[_THISROW].[Cama], [Bloque]=[_THISROW].[Bloque])))
Where [Key Column] is the key column of the table โ€œentrada postcosechaโ€

You may need to add another argument such as maybe โ€œmonthโ€ or โ€œweekโ€ or something similar if the table โ€œentrada postcosechaโ€ has all the historic records and you do this flower cutting activity on the same parameters of โ€œBloqueโ€ โ€œCamaโ€ and โ€œVariedadโ€ in periodic sequence.

Hi Suvrutt Gurjar,

thank you for your reply !!

for some reason the formula shows me an error in function IN()

Where are you trying this formula.

Iโ€™m trying this formula in a behavior

Okay thank you. Please try below. Please create a slice called say โ€œentrada postcosecha sliceโ€, on the "entrada postcosechaโ€ table with the slice filter expression as below

[Key Column] =MINROW(โ€œentrada postcosechaโ€, โ€œDate Columnโ€, AND([Variedad]=[_THISROW].[Variedad] , [Cama]=[_THISROW].[Cama], [Bloque]=[_THISROW].[Bloque]))

Now in the action behavior , please use following expression

entrada postcosecha slice[key column]

i donยดt know what iยดm doing wrong but still not working

  1. I created the slice โ€œentrada postcosecha sliceโ€ and as Row filter condition put the following formula:

[ID Postcosecha] = MINROW(โ€œEntrada Postcosechaโ€, โ€œFecha Ingresoโ€, AND([Variedad]=[_THISROW].[Variedad] , [ID Cama]=[_THISROW].[ID Cama], [ID Bloque]=[_THISROW].[ID Bloque]))

which [ID Postcosecha] is my key column

  1. I created a โ€œData: add a new row to another table using values from this rowโ€ action with this setting

3X_9_4_948a2ed796698b38af8b781fb26400216873ba1a.png

this in order to create the cut start history in the โ€œinicio de corteโ€ sheet.

  1. I created a โ€œData: execute an action on a set of rowsโ€ behavior with this setting

3X_4_f_4ffbbac1b069b4a748b8442ab3b4b308bf1a3eb2.png

  1. finally create a bot which executes the behavior

Oh okay. Thank you for all the details. We started the post with just the filtering condition, then action requirement, and finally BOTs . I think you may wish to change the post category to AppSheet Automation.

Your overall configuration looks good. Scheduled BOTS run only with the deployed apps. Is your app deployed?

Also can you please clarify in what way it is not working?

You may wish to check step by step as below

  1. Is the slice returning expected records?

  2. Is the reference action running just by tapping the action icon in one of the table records ( โ€œEntrada Postcosechaโ€ ) detail view and adding new records in the table โ€œinicio de corteโ€ ?

  3. Is the BOT running in test mode, when you tap on the โ€œRunโ€ button in the Bot pane?

thank you for you patience Suvrutt

1.The slice is not returning anithing.
I think thatโ€™s where the problem is

Please test with a simple MINROW() expression such as
[ID Postcosecha] = MINROW(โ€œEntrada Postcosechaโ€, โ€œFecha Ingresoโ€)

The above should return one row with Y in slice expression test

IS [Fecha Ingreso] a date or date time type column?

Top Labels in this Space