MAXROW BUG?

Hi all, 

i dont think its a bug but i dont know where is the issues. thanks for everybody .

I'm trying to create an action that updates a value in a column on parent table A, after new record in the child table B.

Table A name= OS

Table A colums=OS ID(text, uniqueid()),      Last Setup ID(text)

Table B Name= Setup

Table B Columns=Setup ID (text,uniqueid()), OS ID Number(REF Table:OS, is part of)

Actions 1 - form save event on table setup, that execute an action on this set of rows

leonardorio021_0-1663431860950.png

And the Action 2 - Setup

leonardorio021_1-1663432279742.png

the column  Last Setup ID(text), on TABLE  A = im trying this expression to get the [Setup ID ] value :

LOOKUP(MAXROW("OS","_rownumber",[OS ID Number]=[_THISROW].[OS ID]),"Setup","OS ID Number","Setup ID")

Im not certain about the expressions...if i test data, returns blank, no data matchs....so as a test purpose i reduced for the expression:

Maxrow("Setup",_Rownumber") and again no data matches. then i decided to try this action not from OS table, but from other tables....than it apear to work (not all the expression cause im testeing).

1 - why maxrow is not working only from OS table, and is workin on the other tables.

2 - Any error in expressions ???? , sorry im estuding, not a professional...aganin many thanks anyone can help .

Solved Solved
0 2 141
1 ACCEPTED SOLUTION


@leonardorio021 wrote:
...

leonardorio021_0-1663431860950.png

...

the column  Last Setup ID(text), on TABLE  A = im trying this expression to get the [Setup ID ] value :

LOOKUP(MAXROW("OS","_rownumber",[OS ID Number]=[_THISROW].[OS ID]),"Setup","OS ID Number","Setup ID")


Double check your usage and spelling of the [OS ID] and [OS ID Number] columns.  See below.

  • I see two spellings of [OS ID Number] and [OS IDnumber] -  is one of these misspelled?
  • In the image for the "Update OS After setup" action,  it implies that you have a column in the OS table named [OS ID] and a column in the Setup table of [OS IDnumber].  But in the LOOKUP() expression the MAXROW portion implies you also have a column in the OS table by the name of [OS ID Number].  That doesn't seem right. 

I am not certain why MAXROW is necessary.   MAXROW() is typically used when there can be multiple rows that meet a certain criteria and you want to "largest" of those - whatever "largest" might mean in that context.

Maybe you simply just need this expression?:

LOOKUP([_THISROW].[OS ID],"Setup","OS ID Number","Setup ID")

 

View solution in original post

2 REPLIES 2

If you want to update a parent from child, just trigger an "execute an action on a set of rows" pointing to the foreign key on save


@leonardorio021 wrote:
...

leonardorio021_0-1663431860950.png

...

the column  Last Setup ID(text), on TABLE  A = im trying this expression to get the [Setup ID ] value :

LOOKUP(MAXROW("OS","_rownumber",[OS ID Number]=[_THISROW].[OS ID]),"Setup","OS ID Number","Setup ID")


Double check your usage and spelling of the [OS ID] and [OS ID Number] columns.  See below.

  • I see two spellings of [OS ID Number] and [OS IDnumber] -  is one of these misspelled?
  • In the image for the "Update OS After setup" action,  it implies that you have a column in the OS table named [OS ID] and a column in the Setup table of [OS IDnumber].  But in the LOOKUP() expression the MAXROW portion implies you also have a column in the OS table by the name of [OS ID Number].  That doesn't seem right. 

I am not certain why MAXROW is necessary.   MAXROW() is typically used when there can be multiple rows that meet a certain criteria and you want to "largest" of those - whatever "largest" might mean in that context.

Maybe you simply just need this expression?:

LOOKUP([_THISROW].[OS ID],"Setup","OS ID Number","Setup ID")

 

Top Labels in this Space