cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ZDowning20
Regular Visitor

New to PowerApps I need help with displaying information based on a dropdown selection.

Hi All, 

 

I am building a checklist for my Team and I want it to display a list of software based on someones Job Role. 

 

I have 2 lists built out.

 

The first list is titled "RoleBasedGroups"

This list contain the list of job role groups we have in our organization.

 

Title

Accounting

Finance

Executive

HR

IT

 

The second list is Title Software and contains a list of software someone would need installed in that job role.

Title

Group

Adobe Acrobat Pro

Accounting

HR

IT

Citrix

Accounting

Finance

Executive

HR

IT

Microsoft Project

IT

Microsoft Visio

IT

HR

Finance

VPN

Executive

Finance

HR

IT

What I would like to do is have a drop-down where someone can select a specific role and then a list of software that role needs is displayed. I have been trying to figure this out for a while now.

 

In my drop-down I was told to leave the default value as "RoleBasedGroup.Title"

 

I've been looking for ways to then output the list of software based on the selection in the drop down.

 

For the life of me I am struggling to figure out what I need to do in order display the list of software in a text field.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ZDowning20 ,

Let me make sure something firstly:

RoleBasedGroup list

1)Title field(text type): job name

2)Assigned Software(lookup field allows multiple value): softwares

Do you want to

1)choose a job in a drop down, then display its related softwares in a list box?

2)update with the job and softwares value?

If so, I didn't show you how to change formula about updating.

Could you tell me whether you use Patch function or Submit function to update?

Try this:

1)if you update data use patch function

set the drop down's Items:

RoleBasedGroup

set drop down's Value:

Title

set list box's Items:

Dropdown1.Selected.'Assigned Software'          

The update formula:

Patch(RoleBasedGroup,Defaults(RoleBasedGroup),{Title:DropDown1.Selected.Title,'Assigned Software':Concat(Dropdown1.Selected.'Assigned Software',Value&",")})

 

2)if you update data use Submitform function

set the drop down's Items:

 

RoleBasedGroup

 

set drop down's Value:

 

Title

 

set list box's Items:

 

Dropdown1.Selected.'Assigned Software'          

 

Title datacard's Update:

Dropdown1.Selected.Value

'Assigned Software' datacard's Update:

Dropdown1.Selected.'Assigned Software'   

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

12 REPLIES 12
FlowMohit
Helper I
Helper I

@ZDowning20 Are you using SharePoint list? Are you using look up column to create relationship or just typing the information?

@ZDowning20 Or what you can do is reverse the relationship in your lists. Right now it's one to many between Software and RoleBasedGroup. You can make one to many between RoleBasedGroup and Software. That way it would be easy.

Yes these are custom SharePoint lists. If I do change the relationship around how would I be able to display the list of software in the text field?

@ZDowning20 You can create a drop down control and set it's Items property to - ShowColumns('RoleBasedGroups',"Title")

 

Then on the text box field - LookUp('RoleBasedGroups', Title = Dropdown1.Selected.Title).ColumnName(Where you are storing software information specific to each role)

 

 

v-yutliu-msft
Community Support
Community Support

Hi @ZDowning20 ,

Do you want to display the software list based on selected role?

Could you show me the structure of RoleBasedGroups list and Software list, the field name, field data, field data type?

Here's my advice:

1)RoleBasedGroups list:

Role field(text), Group field(text)

2)Software list:

Title field(software name, text),Group field( look up type, looks up to Group field in RoleBasedGroups list, allow multiple values)

3) the app:

connect the app with the two lists

insert a drop down(named Dropdown1) to select Role

set the drop down's Items:

RoleBasedGroups

set the drop down's Value:

Role

insert a gallery to display the filtered software based on the selection of role

set the gallery's Items:

Filter(Software,Dropdown1.Selected.Group in Group.Group)

 

Then the gallery will only display the filtered soft wares.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@FlowMohit 
I've re-ordered my Data how you suggested.

 

It now looks like this:

 

RoleBasedGroup

Title

Assigned Software

Accounting

Citrix

Adobe Acrobat Pro

VPN

IT

Citrix

Microsoft Project

VPN

e.t.c

 

I see the advantage of doing this because I would be able to add more columns in the future for items we might want to categorize by role.

 

I created the dropdown and set the property to ShowColumns('RoleBasedGroup', "Title"

 

When you say text box field does it matter if it is a text input field and I put it into displaymode.view

 

I entered - LookUp('RoleBasedGroup', Title = ddRBG.Selected.Title).'Assigned Softwre' 

 

When I do this i keep getting an error here:

 
 

2020-03-27_12-33-34.png with description - Expeted Text Value.Data.Default

what is the type of Assigned Software field in SharePoint?

 

The error you are getting is because you are trying to bind table values to a label control.

Hi @ZDowning20 ,

Could you tell me what is 'Assigned Software' field data type?
Do you want to get all the software based on the selection of ddRBG drop down?

I assume that  'Assigned Software' field is a choice field that allows multiple choice.

If so, I suggest you display all the software in a listbox.

Set the list box's Items:

LookUp('RoleBasedGroup', Title = ddRBG.Selected.Title).'Assigned Softwre' 

If you insisting using a label to display all the software, please set the label's Text:

Concat(LookUp('RoleBasedGroup', Title = ddRBG.Selected.Title).'Assigned Softwre',Value&",")

 

//the result of LookUp('RoleBasedGroup', Title = ddRBG.Selected.Title).'Assigned Softwre' is a table. So you need to use Concat function to transfer the table to text.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yutliu-msft 

The 'Assigned Software' data field is a smart lookup to another list.

 

I did end up using a listbox with your formula and that worked great!

 

A couple problems I have run into now are:

#1 It does not remember my selection from the drop down when I look at the data in list view. I have to click on the "Required Info" error and selecting a role from the drop down again.

 

#2 It does not display the data for 'Assigned Software' in list view either. It does display when you create the entry though.

 

Thanks for all the help thus far!

 

@FlowMohit and @v-yutliu-msft 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,354)