cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CoStratify
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
VijayTailor
Resident Rockstar
Resident Rockstar

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
VijayTailor
Resident Rockstar
Resident Rockstar

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

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. 

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."

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

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

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 the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (74,548)