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 / Building a query tool ...
Power Apps
Answered

Building a query tool backed by Python

(0) ShareShare
ReportReport
Posted on by 6

Good day, everyone!

 

I am new to Power Apps, so coming here for help in creating my first App.

 

In making a simple query form/tool like below, here is the idea.

 

Sample.png

 

Basically,

1. it let users to input some strings.
2. by clicking the button, a Python script to examine if the user’s input matches any keys in a preset (Python) dictionary.
3. if the input has a match, it returns the value. Otherwise an error message.

 

This tool will be used and circulated internally in a company.

 

What's the steps I shall follow to create my first Power App?

 

Can anybody please shed some light? Any comments are welcome. Thank you.

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @GC-Page ,

    Do you want to check the input value whether matches any keys, if yes return the input value, if no notify error message?

    If so, you may need these functions:

    1)if statement

    To return different results based on condition.

    Syntax:

    If(condition,trueresult,falseresult)

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

    2)Match function

    To justify whether matches any keys.

    Syntax:

    MatchTextPattern [, Options ] )

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

    3)notify function

    To send notification.

    Syntax:

    NotifyMessage [, NotificationType [ , Timeout ] ] )

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

     

    The code rule is quite different in powerapps and  Python script.

    I suggest you learn the function syntax firstly.

     

    Best regards,

  • GC-Page Profile Picture
    6 on at

    @v-yutliu-msft, thank you for your advice!

     

    however high chance the users' inputs are not fixed (including human entry error). the inputs may be separated by comma.

     

    So I want to use Python script to reorganize the inputs before matching the existing dictionary. Is there a way to integrate Python script into the App?

     

    btw, what would be the first step in creating an App for a newbie? (appreciate if you can point me some tutorials) thank you!

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @GC-Page ,

    1)I'm afraid it's not supported to integrate Python script into the App.

    You should use the code of powerapps in your app.

     

    2)You could use If statement to decide how to deal with the input data based on different situations.

    About the "," problem, you could use Substitute function to replace it.

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

    You could also use Split function to split your input text to a table based on ","

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

     

    3)The steps:

    1\choose a data source for your app

    the supported connectors:

    https://docs.microsoft.com/en-us/connectors/

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-data-sources

    2\design your app

    The control and function part is the key point:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/reference-properties

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/formula-reference

     

    You could start from this app:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/app-from-sharepoint

     

     

    Best regards,

  • GC-Page Profile Picture
    6 on at

    thanks @v-yutliu-msft again for your patience and advice!

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 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard