Get value of the same table

Hi, I have a simple question

I have a table called orders

inside it there are column called [ID] which is the key and a column called [customer name]

I’ve made a another virtual column inside the same table called [shrink customer] and it should read the customer name like this below

MID([Customer name],1,30)

but the results in all rows are the same.

I wonder should I use _thirrow function or what.

please rewrite the best way.

Thanks much

Yes use [_thisRow]

MID([_thisRow].[Customer name],1,30)

or LEFT([_thisRow].[Customer Name],30)will get the leftmost 30 characters since you are starting at 1 anyway

2 Likes

@lynchk21

Thank you very much for the tip.