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?

0 6 147
6 REPLIES 6

Hi,
Is there a โ€œspecial error messageโ€ or just typical โ€œinvalid expression errorโ€?

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

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.

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.

Thank you all for the help!

Top Labels in this Space