Expression has stopped working unexpectedly

I was using this expression for an edit_target action to pull up an existing row:
IF( IN([Barcode], Inventory[FNSKU]), LINKTOROW(SELECT(Inventory[MSKU],[Barcode]=[FNSKU]), "Box_Content"), LINKTOFORM("Box_Content", "FNSKU", [Barcode]) )

It is no longer working. What is the reason an expression would work and then stop working?

Is there a “special error message” or just typical “invalid expression error”?

1 Like

Nothing. It was working yesterday and previously to pull up existing rows containing the scanned barcode and now it’s only pulling up blank rows, even though the data exists.

So to understand clearly:

  • your expression is valid but it doesn’t work as you wish right?
  • Maybe [Barcode] should be exual to [_THISROW].[FNSKU] or [_THISROW].[Barcode] = [FNSKU]?

  • Provide some more informations, please to let me understand what exactly you need to achieve. Maybe I could help :slight_smile:

1 Like

So the way it worked before was I set up a table for scans and one with the information. I set up an edit_target action and a handle_target grouped action. Handle_target is attached to the form view for the scans table. When a barcode is scanned, if it already exists in the information table, then it pulls up the form view of that row to edit the existing data. If it doesn’t exist, it pulls up a new row. Given we input the information before we scan it, empty rows should be extremely rare. This process has been working for about 6 months at this point. Today when I was showing someone, it was only pulling up blank rows, even though the data already exists. I haven’t made any changes to these tables or actions for some time, so I’m not sure why it stopped working all of a sudden.

1 Like

If there is ever more than one record in the Inventory Table, with the same matching [Barcode], then your expression is breaking right here, because the first argument of LINKTOROW expects a single key value, but SELECT returns a List. Perhaps you just need to wrap it with ANY()?


@Marc_Dillon that was it. Now I need to go prevent duplicate entries on that table. :upside_down_face:

Thank you all for the help!