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 197
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

Aurelien
Google Developer Expert
Google Developer Expert

Hi @punkshift

Welcome to the community !

If you are trying to get the children you just need to use your children list column.
Should be something like this:
[Related Assets]

@Aurelien
Thanks for the welcome.

I don’t quite get what you’re suggesting. How do I use that?

Also, I am trying to do the instructions here: Changing Data from a Bot, Workflow Rule or Scheduled Report | AppSheet Help Center

If that will help.

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:

@Aurelien
Thanks for the suggestions, I’ll try these.
Oh, and for this part:

The Checkout form is another table. And when Im trying to add a new entry on this, the Status column in the Asset table doesn’t change even the Bot was triggered.

Hi @punkshift

Greeeeeaaaat !

You may want to make another thread for that if you are still encountering trouble

@Aurelien
The FILTER() worked like a charm!

3X_f_1_f1fb834d2a4c70bceddb7fc06f2425d506df1a52.gif

Top Labels in this Space