web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Expected Text Value Er...
Power Apps
Answered

Expected Text Value Error in Filter Function (SQL Database)

(0) ShareShare
ReportReport
Posted on by

Hi! I'm new in Powerapps and trying to write the formula as much as I can.

I would like to do JOIN table as in SQL query, however Powerapps don't work in this way.

 

There are two tables.
Result I want : Show the Description from Table2 which Table1.Detail1=Table2.Code.

 

In my Powerapps, the Description will show at a Label "D1Description" in the Gallery(which data source is Table1).

I do Filter in Label "D1Description" based on another Lable "D1Code"(which is Table1.Detail1) 
AND Table2.Detail is "D1".

Error Filter - Text valueError Filter - Text value

But I get this ERROR MESSAGE : "Expected Text Value" always, even I searched and tried other function.

 

 

SQL Database examples:

Table1
Column Name  :  Item     Detail1      Detail2

Value   Row1    :    001             A          Aa1

Value   Row2    :    001             B          Bb1

Table2
Column Name : Detail     Code    Description

Value   Row1   :   D1         A         Group 1 

Value   Row2   :   D1         B         Group 2 
Value   Row3   :   D2         Aa1     Group 1 Alpha

Value   Row4   :   D2         Bb1     Group 2 Beta

 

SQL Query
SELECT Description

FROM Table1 X
LEFT JOIN Table2 Y on Y.Code=X.Detail1 and Y.Detail = 'D1'

Appreciate for your advise and guidances.

 

Thank you!

Categories:
I have the same question (0)
  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    In your screenshot the Filter() is in a Text property. Filter() returns a table of records and that is why you are getting the error message. You can use a Lookup() to retrieve a signle record and display the Description information.

     

    Example:

    Lookup('Table2', Code=D1Code.Text And Detail = "D1").Description

  • Community Power Platform Member Profile Picture
    on at

    Thank you so much Jeff!

    I have better picture on Filter and LookUp now!

     

    I searched Join table alternative in internet, I saw some said AddColumns(Filter(...)), may I know is this work the same?

    Or as you mentioned, it is same like Filter(without AddColumns function) returns a table with Columns and filtered records?

     

    Besides this, if the record is more than 500, is the formula LookUp(in your answer above) suggested?

     

    Thank you so much!

  • v-yutliu-msft Profile Picture
    on at

    Hi @Anonymous ,

    1)AddColumns function is used to adds a column to a table.

    It can bu used to reshape the table structure.

    I think use this can achieve the function of "join".

    Here's a doc about this function for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

     

    2)If your record is from 500~2000, this will not effect your formula.

    Just do not forget to change the non-delegation limit to 2000.delegation.jpg

    If your record is larger than 2000, then you need to modify your formula to delegable function.

    Here's a doc about delegation for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

     

     

  • Community Power Platform Member Profile Picture
    on at

    Dear Phoebe,

     

    Thank you very much for your reply!
    Sorry that I still don't really get it even though I read the docs.microsoft pages.

     

    1) AddColumn

    Based on my example above, create a Gallery(Data Source Table 2) to show multiple columns(including a column from Table 1), does AddColumn(Filter(..)) mean it will create new columns for the Results?

     

    2) Delegation

    Everytime I write formula Filter(...) or/and contains "=" then Delegation Warning will happen.

    However, the database contain of data more than 2000 rows in SQL Server.

    I really confuse on the references in docs.microsoft webpages and confuse on how to modify the formula to delegable. 

    Is there any precise explaination on "modify the formula to delegable function"?

     

    Pardon me if I asked silly questions.

    Thanks alot!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard