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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Cannot used Customer C...
Power Apps
Answered

Cannot used Customer Connector to call API with the Post Method

(0) ShareShare
ReportReport
Posted on by 7

Dear Community, 

 

I created the Customer Connector to connect my customer's API with the POST method (the body is JSON with many levels). I tested the connection successfully. 

When I used this customer connector to put the result in text input or text label, I get the issue "Behavior function in a non-behavior property. you can't use this property to change values elsewhere in the app". 

 

I attach the picture issue 

 

I'm looking forward to hearing from you.

Regards

Tuan Tran

 

 

error1.jpg
error2.jpg
Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @luckytran :

    Firstly,let me explain why you encounted this problem.

    Your code SCBAPI.GETSCBAPI(……) is a behavior function,but text property is a non-behavior property.Therefore, the app will report an error.

    Secondly,I suggest you try this solution:

    Put this code in a behavior property and assign its value to a variable.

    1\Set the apps OnStart property to:

     

    Set(Var,SCBAPI.GETSCBAPI(……)) /*Var is a custom variable*/

     

    2\Set the lable control's text property to :

     

    Var

     

     Best Regards,

    Bof

  • luckytran Profile Picture
    7 on at

    Hi @v-bofeng-msft 

     

    Thank you for your reply. 

    I tried your guide but Text Label didn't display the result. 

     

    I set a variable value at Screen - OnVisible. 

    luckytran_0-1592973585963.png

    After that, I set the attribute "Text" of Text Label is this variable - ApiData, but didn't display the result

    luckytran_1-1592973677183.png

     

    Please help me with this case. 

     

    Regards

    Tuan Tran

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @luckytran :

    I suggest you put this code in OnStart property and select "Run OnStart" to test it.

    If there is still no result, please check whether your custom connector is configured correctly, and check your code for problems.

    Best Regards,

    Bof

  • luckytran Profile Picture
    7 on at

    Hi @v-bofeng-msft 

     

    Thank you for your support. I used the onSelect attribute of the button and I can get the POST method result. 

     

    I have one more question. How can I get the status (httpcode) when I call API. 

     

    Regards

    Tuan Tran

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @luckytran :

    You can see ‘Status’ after clicking “Test operation”, but it seems that it cannot be called directly in the canvas.

    1.JPG

    Best Regards,

    Bof

  • luckytran Profile Picture
    7 on at

    Hi @v-bofeng-msft 

     

    I mean that In Power Apps Creates website (https://as.create.powerapps.) , How I can get HTTP codes to popup message when there are errors in API Calling process.

     

    Thank you

    Tuan Tran

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard