Notifications for specific user

tvinci
New Member

Hello AppSheet Community

I would like to send notifications only to a specific user when an action that affects that user takes place in the app. So I wrote this expression:

lookup(
lookup(
lookup([_THISROW],
"clipboard",
"Key",
"Customer"),
"routes",
"key",
"Driver"
),
"UsersV1",
"Name",
"ID")

Here is the Spec for my app:

Every single user receives a notification whenever I make an action. I donโ€™t know what I did wrong with my expression. Does anyone have any ideas? Thank you.

  • Tiffany
0 2 162
2 REPLIES 2

Itโ€™s hard to tell without seeing the app, one trick I do sometimes is to convert the nested lookups into plain english and then stare at it until I see what the problem is (thereโ€™s always a problem - lookup() in and of itself functions just fine). So, hereโ€™s your nested lookup statement in plain english:

First, in table clipboard get the value of Customer where Key equals the current rowโ€™s key, and then,

Second, use this Customer key value to get the value of Driver from the table routes where key equals the customer key retrieved, and then,

Finally, use this Driver value to get the ID field from the table UsersV1 where Name equals the Driver retrieved.

I suspect somewhere in here you returned an entire list of all values from a table?

The reason I used a nested lookup statement is that Routes and Clipboards have parent child relationships. I will try what you suggested and let you know if it works. Thank you.

Top Labels in this Space