Row Column Value From Row Key

Hello all,

I haven't been around App Sheet too long, and this is my first post, so I may be missing some easy method to this. I'm curious if there is any other way besides a LOOKUP() or SELECT() to retrieve a specific column's value from a row if I have that row's key. I've looked around the documentation and haven't had much luck in what I'm looking for, but I could be missing it.

I'm working on putting an app together that builds upon the idea that is talked about in this post: https://community.appsheet.com/t/manual-sorting-move-items-w-buttons-bonus-sequential-numbering/4108..., and I'm hoping to alter some other columns of mine  when a row is moved. However, when I move a row, I'm hoping to use a value from the previous row (or next row depending on the case) in order to update my current row's values and the previous row's values appropriately. For static changes this works great, but I'm hoping to get the value of a row's Price column when I have the row's key. 

I hope I've made sense here. Any help would be greatly appreciated!

Solved Solved
0 7 638
1 ACCEPTED SOLUTION


@Connor_Allen wrote:

 and then putting .[columnValue] at then end.


This doesn't work. You have to follow the syntax of the expression. You first have to do your "manipulations" and store the result in a column, then use this [column name]  in the dereference expression.

 

View solution in original post

7 REPLIES 7

Hey Connor,

Is there a reason why SELECT() isn't working for you?

SELECT() works great and gets me exactly what I need! However, the more time I've spent on these forums I've just been reading about potential performance issues with it, so was trying to stay away if I could. Maybe that's unnecessary though?

Hello Connor and welcome to the community!

If you already have the row's key, then you should use: [rowKey].[columnValue]

See: 

https://help.appsheet.com/en/articles/1090811-dereference-expressions

 

 

Thanks!

I'll try this out! For some reason, I thought [columnValue] had to be from a different table and wouldn't work in the same table. Will see what I get though. 

So this is definitely the way to do it, but it doesn't work for me because of my approach to getting the id of the row I guess. Simply using [rowKey].[columnValue] does work, but I'm doing some manipulation to a list of keys to get it to a single key and then putting .[columnValue] at then end. Unfortunately this still returns the key itself. Though confusing, here is basically what I'm doing. This is a link from that sample app I linked in the post and utilizing the Try it feature: My Attempt 

Even simpler put, it doesn't look like this works if you do something like TEXT([rowKey]).[columnValue]. 


@Connor_Allen wrote:

 and then putting .[columnValue] at then end.


This doesn't work. You have to follow the syntax of the expression. You first have to do your "manipulations" and store the result in a column, then use this [column name]  in the dereference expression.

 

That makes sense. Thanks for the help!

Top Labels in this Space