Group By + Select + suggested value

I am writing one expression which gives me unique value of column but I want result associated with second column.

image
image

SELECT(Task[Task(s)],[Organization] = “A”)

Above expression gives me the result (In dropdown)
Task1
Task2
Task3
Task4
Task5
Task6

but I want the result as
Task1 - Section 1
Task1 - Section 2
Task2 - Section 1
Task2 - Section 2
Task3 - Section 1
Task4 - Section 1
Task5 - Section 1
Task6 - Section 2

I need a similar solution as in MySQL

SELECT CONCATE(Task(s),’-’,Section) FROM Task WHERE Organization = “A” GROUP BY Task(s),Section

Any suggestions would be great. Thanks :slight_smile:

Hi @rrhirani!

I think this is the answer:

SELECT(Task[Section],[Organization] = “A”)

When in doubt, please go to AppSheet documentation

https://help.appsheet.com

and search for the expression you are using – in this case SELECT():

Good luck!

@Kirk_Masden: No, it’s not. I need a similar solution as a MySQL query.

SELECT CONCATE(Task(s),’-’,Section) FROM Task WHERE Organization = “A” GROUP BY Task(s),Section

@rrhirani
You cannot create it with a SELECT expression. I may advise structuring a Virtual Column in that table with simple CONCATENATE expression first:

CONCATENATE([Tasks(s)]," - ",[Section])

And then call this column in your Suggested Values:

SELECT(Task[VirtualColumnName],[Organization]="A")
4 Likes

Perfect, It’s working like a charm!! :heart_eyes: Many thanks for your prompt reply!! :+1: Cheers :beer:

1 Like

Sorry. I should have paid closer attention to what you were trying to achieve. I’m glad @LeventK gave you a good answer.

1 Like