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 / Differing behaviour fo...
Power Apps
Unanswered

Differing behaviour for app in Studio to Published

(1) ShareShare
ReportReport
Posted on by
OK bear with me - this could be a long one...
 
I have a Model Driven App - with an embedded Canvas App. 
The Canvas App is the problem here, in that in the studio the functionality works, but when published it does not.
 
Background and app purpose:
 
So, what I am trying to do is use a dropdown field to change a search box lookup O365 connector.
 
The properties of the DropdownCanvas item are:
 
  Items: ["Company 1", "Company 2"]
  OnChange: Set(vCompany,DropdownCanvas1.Selected.Value);
 
I then have a People Picker collection (installed from catteam)
 
Items: 
  Switch(vCompany,
      "Company 1",DefaultUserCollection_C1,
      "Company 2",DefaultUserCollection_C2
  )
OnSearch:
Switch(vCompany,
    "Company 1",
        //Notify(Self.SearchText);
        Set(vInUse,"T");
        ClearCollect(
            UserCollection_C1,
            AddColumns(
                Filter(
                    Office365Users_C1.SearchUser(
                        {
                            searchTerm: Self.SearchText,
                            top: 500
                        }
                    ),
                    !IsBlank(JobTitle)
                    && AccountEnabled = true
                ),
                SuggestionImgUrl,
                Substitute(
                    JSON(
                        Office365Users_C1.UserPhotoV2(Id),
                        JSONFormat.IncludeBinaryData
                    ),
                    """",
                    ""
                ),
                SuggestionKey,
                Mail,
                SuggestionName,
                DisplayName,
                SuggestionRole,
                JobTitle
            )
        ),
    "Viridor",
        //Notify(Self.SearchText);
        Set(vInUse,"V");
        ClearCollect(
            UserCollection_C2,
            AddColumns(
                Filter(
                    Office365Users_C2.SearchUser(
                        {
                            searchTerm: Self.SearchText,
                            top: 500
                        }
                    ),
                    !IsBlank(JobTitle)
                    && AccountEnabled = true
                ),
                SuggestionImgUrl,
                Substitute(
                    JSON(
                        Office365Users_C2.UserPhotoV2(Id),
                        JSONFormat.IncludeBinaryData
                    ),
                    """",
                    ""
                ),
                SuggestionKey,
                Mail,
                SuggestionName,
                DisplayName,
                SuggestionRole,
                JobTitle
            )
        )
);
 
There are some other minor properties on the search but nothing major.
The idea is - based on the dropdown, use the relevant connector to lookup users from EAD.
 
This works - in Studio, change the dropdown and the relevant directory is searched.
When Published and run - only the first connector is used.
 
I have used tables to view the collections I am using to verify all this and its just not working as it should when published.
I feel like I am missing something simple...but cant see the woods for the trees if that makes sense?!
 
Any one feeling brave enough to help?
 
Thanks
Dan

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard