web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combobox connected to ...
Power Apps
Unanswered

Combobox connected to a Person Sharepoint column problem

(0) ShareShare
ReportReport
Posted on by 878

In the past I've used these codes to get a choice made from a collection of emails to work, no problem: 

Update property of Data Card:
If(
	IsBlank(DataCardValue19.Selected);
	Blank();
	{
		Claims: "i:0#.f|membership|" & DataCardValue19.Selected.UserPrincipalName;
		DisplayName: "";
		Mail: DataCardValue19.Selected.UserPrincipalName;
		Department: "";
		Picture: "";
		JobTitle: ""
	}
)
Default of DataCard
{Mail:ThisItem.'NAME OF COLUMN'.Email}
DefaultSelectedItems of Combobox
LookUp(COLLECTIONofemails; UserPrincipalName = ThisItem.'NameOFCOLUMN'.Email)

All of them together allow for the email to save on the list, and remain saved (not dissapearing) when you go into edit mode.

My problem is that I have something new that I have no idea how to tackle:

I have 9 collections for the 9 departments of the company, each with different emails depening on the people on the company. It all depends of what you Department you choose in DataCardValue11. Have no idea how to tackle this big conditional both in the ComboBox and also in the Update property of the DataCard. Tried with "If" but no luck. Also tried instead of coing the collection route, connecting to an Excel table that holds all the emails sorted by department. But had no luck here (i could sort the name of people depending on the Department in the Combobox, but then if I wrote in the Update of the DataCard "Selected", it told me it was receiving a Table type of data, and it was expecting a Record type).

So.... How would you go out about this?

 

I tried also changing the Items property with "Or" and "Switch" functions but coulnd't get it to work as it told me it expected to receive boolean type of data. 

Categories:
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi  @WorkingRicardo 
    I'm not sure what you want to actually do!What do you want to appear in the combo box and what do you want the Update property of the card to do?

     

    Also for this part:

    "it told me it was receiving a Table type of data, and it was expecting a Record type."
    You get that message when you are passing a Table (more than one record) but the sharepoint column is configured as single selection (doesn't allow multiple values) which of course requires one record.

     

    Table:

     

     

    [
    	{
    		Claims: "i:0#.f|membership|bob@work.com",
    	 Department: "IT",
    	 DisplayName: "Bob, Bob",
    	 Email: "bob@work.com",
    	 JobTitle: "",
     	Picture: ""
    	},
    	{
    		Claims: "i:0#.f|membership|mary@work.com",
    	 Department: "Procurement",
    	 DisplayName: "Poppins, Mary",
    	 Email: "mary@work.com",
    	 JobTitle: "",
     	Picture: ""
    	}
    	{
    		Claims: "i:0#.f|membership|donaldduck@work.com",
    	 Department: "Media",
    	 DisplayName: "Duck, Donald",
    	 Email: "donaldduck@work.com",
    	 JobTitle: "",
     	Picture: ""
    	},
    	{
    		Claims: "i:0#.f|membership|rose@work.com",
    	 Department: "Corporate",
    	 DisplayName: "Red, Rose",
    	 Email: "rose@work.com",
    	 JobTitle: "",
     	Picture: ""
    	}
    ]

     

     

     

    Record:

     

     

    {
    	Claims: "i:0#.f|membership|donaldduck@work.com",
    	Department: "Media",
    	DisplayName: "Duck, Donald",
    	Email: "donaldduck@work.com",
    	JobTitle: "",
     Picture: ""
    }

     

     

  • WorkingRicardo Profile Picture
    878 on at

    Hey @DJ_Jamba ty for your reply, and sorry! It was quite confusing how I explained it xD Maybe with a photo would be more clear:

    Muestra.png

    So, depending on which of the 9 Department in the "Departatmento" combobox I choose, the different people should appear from the collections I made on the "Solicitante" combobox.

    Example: I'm in the IT department as well as 4 other people. I created a collection of all of our 5 emails and names using this code to get our data from our boss: 

    ClearCollect(ITDpt;UsuariosdeOffice365.DirectReports("bigITboss@Company.com"))
    
    I also added our boss to the collection:
    Collect(ITDpt;DisplayName:"BigBoss";UserPrincipalName:"bigITboss@Company.com";Mail:"bigITboss@Company.com"})

     So, there are 9 collections in total. I need the behaviour for the second combobox for all this conditionals.

    All the while, I need this to actually save, because I regularly have issues when you go to edit mode for people columns, as they go blank. That's what those code I put above are for, in the Default and DefaultSelectedItems, so they actually remain saved. 

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    To check if I'm on the same page (yet)!
    - The data collected from departments in up to 9 collections contains a person column at the very least?

    - You want whatever people that have been collected in those collections to be listed in the combo box?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard