cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Recalling SQL data in a powerapp when entering the ID number.

I have a powerapp Incident Form that has about 30+ fields.

 

The user submits the data to a SQL database. Another user later on needs the ability to call up a particular record to review and/or make changes thus updating the record for that particular incident.

 

Would a display form be needed for this, and what object/function would i need for the user to enter the ID # to recall the record.

 

Thank you for any assistance you can offer.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Hi @mikesmeltz ,

If the second user knows the record ID from SQL table and can write it in a textinput control , then it's a simple task to show/edit the record:

For this, you will need a form:

Set datasource property of the form to:

               yourSQLTable (the name of the SQL table)

and item property to:

              LookUp(SQLTable, ID = Value(textinputcontrol.Text))

I supposed that ID column from SQL Table is an int type column (that why i used Value () function). Also, if my supposition is true set Format property of textinput control to TextFormat.Number.

 

To get all done ... set OnChange property of textinput control to:

ResetForm(yourNewForm);EditForm(yourNewForm)

and of course if you want to save the user's work you will need a button with OnSelect set as:

SubmitForm(yourNewForm)

 

Hope it helps !

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Hi @mikesmeltz 

You can use an edit form to enable the user to edit a record. Let's suppose you add a text input control to your screen called txtID.

In your edit form, it would set the data source property to the name of your SQL table, and you would set the item property to:

LookUp('[dbo].[YourTable]', YourIDField=Value(txtID.Text))

 

Highlighted
Memorable Member
Memorable Member

Hi @mikesmeltz ,

If the second user knows the record ID from SQL table and can write it in a textinput control , then it's a simple task to show/edit the record:

For this, you will need a form:

Set datasource property of the form to:

               yourSQLTable (the name of the SQL table)

and item property to:

              LookUp(SQLTable, ID = Value(textinputcontrol.Text))

I supposed that ID column from SQL Table is an int type column (that why i used Value () function). Also, if my supposition is true set Format property of textinput control to TextFormat.Number.

 

To get all done ... set OnChange property of textinput control to:

ResetForm(yourNewForm);EditForm(yourNewForm)

and of course if you want to save the user's work you will need a button with OnSelect set as:

SubmitForm(yourNewForm)

 

Hope it helps !

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,776)