I have been reading and watching various videos for about 2 days now and I am still not getting anywhere. I am trying to build a custom form using powerapps to add some dynamic showing and hiding of fields to allow users to enter in only the values that I need them to.
Here are the lists I have in scope and which ones have lookups to each other
Lists | Lookup to Schedule | Lookup to Time card | Lookup to Department list | Lookup to Station list |
Schedule |
| |||
Timecard |
|
| ||
Department list | ||||
Station list |
|
I am trying to get the end user to create a time card entry where depending on the entry may need to choose the Job they were working on. If they do that, they need to select the station they were working on. However, equipment( or stations) can be in multiple departments. Example a brush could be part of the painting department and the maintenance department but the equipment isn't shared between the 2 departments. We would have multiple "brushes" that each belong to their own department but they are the same model of equipment.
Where i am having the problem is trying to filter the Station field(Lookup to the title field in 'Station List') while filtering on the 'Department' field(which is a lookup to the department list.)
I will have the user select the JobID from the dropdown (which is in the Schedule list and has the Department value and cost code). I then want them to select the Station from the filtered combobox.
I have a few screenshots for reference. The forms are just me figuring it out. example You will see 2 "Plate" in the department section and 2 spots for cost code.
Any help would be appreciated.
Solved! Go to Solution.
Have you tried something like this:
Filter(Station, Department.Value = DepartmentDataCardValue.Value).Title
Note: replace 'DepartmentDataCardValue' with your DataCardValue## that corresponds to the Department DataCard.
If this doesn't work, can you please list some code you have tried.
Tried hard coding a value in the department list and it works.
Filter('Station list', Department.Value = "Plate").Title
I guess it took me going outside to reboot to make sense of this. With your help, here is what I ended up using which now works dynamically. Looks like it wanted a text value from the dropdown (ddDept) I populated.
Filter('Station list', Department.Value = ddDept.SelectedText.Title).Title
Have you tried something like this:
Filter(Station, Department.Value = DepartmentDataCardValue.Value).Title
Note: replace 'DepartmentDataCardValue' with your DataCardValue## that corresponds to the Department DataCard.
If this doesn't work, can you please list some code you have tried.
Tried hard coding a value in the department list and it works.
Filter('Station list', Department.Value = "Plate").Title
I guess it took me going outside to reboot to make sense of this. With your help, here is what I ended up using which now works dynamically. Looks like it wanted a text value from the dropdown (ddDept) I populated.
Filter('Station list', Department.Value = ddDept.SelectedText.Title).Title
Well done on sorting this mate. You can also mark your answer as a Solution, if you like, so there are 2 solutions? This can help future PowerAppsters if they have a similar problem.
As a small suggestion, if I may, I'd recommended you using 'Selected' rather than 'SelectedText', if the option to do so is available. I tended to use the latter in the early days but found the former seems to work better. I cannot recall the reason why, just that I do it that way now 🙂
I will give that a try. Thank you for your help. I have another issue that I am going to start a new thread on.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
207 | |
97 | |
60 | |
51 | |
45 |
User | Count |
---|---|
257 | |
158 | |
85 | |
79 | |
58 |