I think im doing it wrong; SELECT() Expression

I have two tables, one is Assets, the other one is Asset Checkin Checkout.

I’m trying to change the value of the Status column from “Ready to Deploy” to “Deployed” under the Assets if a device has been checked out in the Asset Checkin Checkout sheet.

This is the expression I used under Referenced Rows: SELECT(Assets[Asset Tag #],[Asset Tag #]=[_THISROW])

It says it’s correct but when I’m trying to add a new entry in the Checkout form, it’s not changing the status. I already created the Bot for this

Hope you could help me with this!

Solved Solved
0 6 201
1 ACCEPTED SOLUTION

Hi @punkshift

Got it. I may have been too fast.

Let’s get it from the beginning, then
At explaining the [Related Assets] and REF_ROWS() expression, I realized my suggestion was incorrect. Please apologize my mistake.

About your request, now:

What attracts my attention is that this field expects a list of references. The “expression validator” just says the syntax is correct.

So, you may prefer:

SELECT(Assets[assetKeyColumn],
   [Asset Tag #] = [_THISROW].[Asset Tag #]
)

Also, you may prefer using FILTER instead of SELECT, as it will always returns a list of key_column values of the table.
That will give:

FILTER("Assets",
   [Asset Tag #] = [_THISROW].[Asset Tag #]
)

Then, about the context you give:
I have some questions regarding the way you proceed to achieve your goal.
This:

Makes me think you have a status in order to know which are the assets that are checked in or out.
But, I don’t see any condition in your expression to do so.
You may rather want to use this expression instead:

FILTER("Assets",
  AND(
      [Asset Tag #]=[_THISROW].[Asset Tag #],
      [currentStatus]="Ready to Deploy",
      [checked_In]=true
   )
)

This:

Not sure either what you mean. Is it a form based on a current asset that you wish to make status evolve ? Can you explain further ?

For reference:

View solution in original post

6 REPLIES 6
Top Labels in this Space