I have 2 different tables:
I created a browse screen to show quick view for open jobs - I need to display SIteName and Job no.
Template shows already SiteID and Job no, but I need Site Name so everyone can understand where to go.
Now, I tried to add a dropdown box to pull information from Sites table, looks ok but there is a problem; always shows first value on Sites table.
Sites and Jobs are stored in SQL Office 365 server, as you can see there is a SiteID lookup field on jobs list, but still I can't make it work - must be I am doing something wrong.
Any ideeas about this?
Solved! Go to Solution.
Your ideea works just fine, thank you very much.
However, as I said yesterday it's loading very slow, but at least does the job.
Thanks again for your help, I will accept your answer as a solution and I will move on with another issue :)!
You can use Distinct for Dropdown and then use LookUp to pull information for corresponding SiteName, and
Patch or Browse, as you wish.
(I stopped my car at the road site when I saw your message and I wish my road-side CLUES, works for you again!. TQ)
e.g. for reference.
LookUp(TableSite, SiteID in Dropdown1.Selected.Result).SiteName
...please modify as of your needs...
Hope it helps.
Thanks for your answer. Using Lookup is a solution, but not the best one. I think you agree with me this solution is really too slow.
I taught there's a way to do this more efficient, like Access does, for example.
If there's no other way, I will use Lookup.
I am not really sure what is your approach in your apps, though looks pretty simple.
I am just quoting example of using LookUp.
You may use Filter or any other methods, so that the related SiteName is display next to SiteID whenever it is chosen, say in your Gallery, automatically.
(I am just quoting way outside the box).
Have a nice day.
Solution proposed by hpkeong is not working for me.
Probably i didn't make my self clear enough, I really think must be a very easy solution, as this is very common thing.
Let me explain again:
I have 2 tables:
Sites: SiteID; SiteName, Sitedetails
Jobs: JobID, SiteID, JobNo, JobDetails
I need in browse screen to display few information, like that:
SiteName; JobNo; JobDetails.
At this moment I can display:
SiteID; JobNo, JobDetails.
How can I get PowerApps to show SiteName instead of SiteID on browse screen or edit screen?
I used Dropown box for SiteID, it is displaying SiteName but is same for every job I add (although in Jobs table, SiteID is shown corectly).
I hope I made myself clear enough and i hope also we can find a solution for this, because this is a common scenario I believe.
Thank you very much.
I am equally new in PowerApps and just try to share the CLUES, not solution.
(When I saw your message, I stopped my car at a safe road-site to draft a complete Road-Side clues.)
I tried to show a complete example:
Use this please:
- LookUp(TableSite, SiteID = ThisItem.SiteID).SiteName
When I used DropDown, it is only a clue.
- SiteID refers to SiteID in TableSite.
- ThisItem.SiteID refers to SiteID as in TableJob (which is the Gallery.Items - TableJob)
The following is to show ALL fields for easier perception.
You can then drop those unwanted fields and it will not affect.
Hope this helps.
Your answer is much appreciated, I don't have any issues with your clues! Moreover, your clue from last reply may work , I will check tonight.
I am waiting for some answers from Powerapp staff, as I honestly believe online documentation is not at all comprehensive.
I can understand they can't cover everything, but my problem is related to a very basic requirement which should be properly explained.
That because I still believe Lookup is not a proper way to do this - takes ages to load.
Thanks for your comments.
My Sharing of using LookUp (and any other formuals)
- LookUp will start to MATCH SiteID = ThisItem.SiteID to find and get/show SiteName
- This will be processed through all the records and will slow down, I agree. (PG Staff has shared and given me such a clues).
Hence, My idea for you
- When you are selecting SiteID, using the same LookUp to get the SiteName from TableSite, then only SAVE.
- Eventually, you are SAVING SiteName, NOT SiteID (if you wish to save SiteID, it is still OK) into your TableJob.
- In this case, your TableJob will have SiteID (if you wish), SiteName, JobNo, JobDetails.
So, when use Gallery to show all data, it will not involve any Processing of Data.
I wish this may further clarify the reason why.
Wish PG can help.