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

Set a value by selecting a different column's value

Hello!
I have got a SQL table with applications. Each application has an ID called 'AppID'.

I also have a SQL table for servers. Every server needs to have an Application associated with it. The user however does now know the AppID and would need to use the AppName to select it.

 

The server content is in a gallery in my PowerApp and can be edited from there. This is then saved to the DB via a patch.

I need the user to be able to select an Application from a dropdown (showing all of the AppNames included in the table). After, editing the row the patch needs to assign an AppID to the server row, dependant on the AppName selected (the AppID that is on the same row in the Application table).

 

I have tried the below and it works.

 

Dropdown Items =     '[dbo].[fp_cat_apps]'. AppName

 

Dropdown section of Save Patch =      

AppID: Dropdown1.Selected.AppID

 

 

However, my major issue, is that if the server already has an AppID assigned to it, I want the dropdown to see that and show it in the dropdown's content by selecting it in the first place.

 

Please let me know if I can provide any more information 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Re: Set a value by selecting a different column's value

Hi ,

better for this issue you can use Combobox. 

and set the yellow highlighted in the screenshot

VijayTailor_0-1600880995439.png


Once to set above 2 properties  (Highlighted in Screenshot) then it will same look like DropDown.
After that set the  DefalutSelectedItem if AppID is already assigned.
like in  the below place.

VijayTailor_1-1600881069755.png

 

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

5 REPLIES 5
Highlighted
Memorable Member
Memorable Member

Re: Set a value by selecting a different column's value

Hi ,

better for this issue you can use Combobox. 

and set the yellow highlighted in the screenshot

VijayTailor_0-1600880995439.png


Once to set above 2 properties  (Highlighted in Screenshot) then it will same look like DropDown.
After that set the  DefalutSelectedItem if AppID is already assigned.
like in  the below place.

VijayTailor_1-1600881069755.png

 

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Frequent Visitor

Re: Set a value by selecting a different column's value

This is great! Thank you. 

Your first step makes sense, but what do I need to write for the second step to get it to see the AppID as default?

I have tried 
If(ThisItem.AppID) but brings up errors. 

Highlighted
Memorable Member
Memorable Member

Re: Set a value by selecting a different column's value

Please Attached Screenshot if possible.

but for DefaultSelecteItem you can set like that - [ThisItem.'Project Name'.Value].

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Frequent Visitor

Re: Set a value by selecting a different column's value

Thanks again. 
Had a look at your second screenshot and it doesn't contain a formula in the highlighted box. 
I have again tried [ThisItem.'AppID'.Value] but again sadly doesnt work

Highlighted
Memorable Member
Memorable Member

Re: Set a value by selecting a different column's value

Can you attach the screen of the Issue or Error? showing

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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