Hi all, how are you?
I have the typical app to manage and move inventory, once an item arrives to destination it must be updated in the move history and after that, the registry of the element must change a field from “En Tránsito” to “Recibido”, for example. For that I have a grouped action in the table TRASLADOS where the first action creates the new record for the history of moves, the second action updates the original record of the move to set it to “Entregado”, this is done only to make it desappear of the related table “TRASLADOS” of the current element of the inventory, the third action doesn’t make the job and I don’t know why, this action suppose to select the rows on the table INVENTARIO_ORIGINAL which matchs the ID_ACTIVO of the TRASLADOS table to update the field “ESTADO_TRASLADO” to “Entregado”.
The images are numbered like follows:
01-Recibir traslado (1 a 1).
02-Actualizar estado del activo en modo traslado en INVENTARIO GENERAL desde TRASLADOS
03-Fórmula para la acción Actualizar estado del activo en modo traslado en INVENTARIO GENERAL desde TRASLADOS
04-Actualizar activo en recepción a “Recibido”.
I’ve been using qwen and gemini to try to solve this but it doesn’t work so, any help is appretiated.
I’ve updated the formula for the action shown in the image 02 to
FILTER(
"INVENTARIO_GENERAL",
AND(
[ID_ACTIVO] = [_THISROW].[ID_ACTIVO],
OR(
[ESTADO_ACTUAL] = "En Tránsito",
[ESTADO_ACTUAL] = "Pendiente"
)
)
)
but nothing different happens.
Again, thanks in advance for the help.
The table names between the text above and the FILTER expression don’t match. Which one is correct?
Why does the text reference a column to be updated named “Estado_Translado” but the FILTER expression is selecting rows by a column named “Estado_Actual”?? That seems a little odd.
As for the rest of the FILTER expression, it seems reasonable. Have you checked your data to make sure that “ID_Activo” column matches and that “Estado_Actual” (if correct) ALSO has the expected values?
What does the Referenced Action (not mentioned here) do?
I was watching what you said and after reviewing it I explain the following: the action which use the filter is for the table TRASLADOS, that action what suppose to do is select the rows on the table INVENTARIO_GENERAL that has [ID_ACTIVO] equal to the [ID_ACTIVO] of the table TRASLADOS
[ID_ACTIVO] = [_THISROW].[ID_ACTIVO]
as first condition, the other condition is that the column [ESTADO_ACTUAL] of the table INVENTARIO_GENERAL has the values “En Tránsito” or “Pendiente” but [ESTADO_ACTUAL] is on the table INVENTARIO_GENERAL, the filter function knows that because of the first argumente which makes reference to this table by the first argument but again, that formula is used in the table TRASLADOS to be applied to the table INVENTARIO_GENERAL by using an action of the type “Execute an action on a set of rows” with the table TRASLADOS, in which the action “Execute an action on a set of rows” will be executed, then there is the table INVENTARIO_GENERAL as referenced table and the action to update the respective record (matching the ID extracted from the table TRASLADOS) of this las table.
I think my logic should be correct but nothing happens so something is wrong, but I don’t know why.
If you want I can make a video.
I repeat, The filter suppose to select the rows of the table INVENTARIO_GENERAL whose column [ID_ACTIVO] matches the [ID_ACTIVO] column of the current row in the table TRASLADOS, and also has the field value of the column [Estado_actual], also in the table INVENTARIO_GENERAL equal to “En Tránsito” or “Pendiente”.
I explained that again because sometimes I doesn´t explain well what I mean
@vramirez80
Ok.
Your FILTER expression seems correct. You need to validate that it is ACTUALLY identifying rows to be processed. The way I do that is by creating a TEMPORARY Virtual Column, insert the FILTER expression into its Ap Formula and then display that Virtual Column on a Form View or Detail view - preferably the Form View where I am determining the [_THISROW} part of the Filter expression so I can see it change immediately when the Form View data is changed.
If your test Virtual Column is NOT pulling in the expected rows then you need to look more closely at the Filter expression AND the columns being used to filter the data. A common issue is that the “[ID_ACTIVO] = [_THISROW].[ID_ACTIVO]” part of the expression do not actually have matching values.
If you find that the test Virtual Column is pulling in the expected rows, then remove the test Virtual Column and focus your attention on the Referenced Action being called by the “Execute an action on a set of rows” action. You haven’t shown us the Referenced Action yet.
A video showing your involved tables and actions would probably be very helpful so we can see more details that are hard to explain in text.
Hi @WillowMobileSys , sorry for the delay and well, I will tell how I solved the problem.
After change the context to move all the actions for the sending a and receiving elements from one place to another to the table INVENTARIO_GENERAL, then I made a grouped action for the same I explained before but I had the same problem, apparently the grouped action and/or the last action of the grouped action looses the context after applying a form and beeing saved, so I changed the action to modify the table TRASLADOS in this case from the table INVENTARIO_GENERAL to an action of type “Add a new row to another table using values from this row”, that way the actions doesn’t loose the context and all is stored in the way originally planned.