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 / Multichoice LU Field d...
Power Apps
Answered

Multichoice LU Field disappearing on New Form and form throwing a Bad Gateway error on updating form

(0) ShareShare
ReportReport
Posted on by 160

I am using a SharePoint list as my datasource (Onboarding) for my canvas powerapp.  I have researched the field disappearing since Tuesday and cannot seem to get it to work properly.  Once I set up the Update property on the Director field, it worked to save it to the form but would throw a Bad Gateway error.  It is not saving to the form anymore, though, either.  The director field is filtered by the value in the division field.  PLEASE HELP!  I have been messing with this for days and did not have a bad gateway error until Tuesday after months of testing.  It was after I added the function to the Update and DefaultSelectedItems that it started throwing the error when editing an existing item but when I create a new item, it sends the data to SharePoint except for the Director values (Result) and loses the data in the LUDirectorDataCardValue11 dropdown box.  IT IS NOT A COMBO BOX.  Any help will be very, very appreciated.

 

Division (Choice column)

LUDirector (LU Column with the mulitple choices checked to another SharePoint list called DivisionDirector )
LUDirectorDataCardValue.Item:  

 

Distinct(Filter(Choices([@Onboarding].LUDirector),Value in Filter(DivisionDirector, LUDivisionsDivDir.Value = DivisionDataCardValue11.Selected.Value).txtDirector),Value).Result

 

LUDirectorCard.Update:

 

ForAll(
DirDataCardValue11.SelectedItems,
{
Id: ID,
Value: LUDirector
}
)

 

LUDirectordDataCardValue11.DefaultSelectedItems:

 

ForAll(
ThisItem.LUDirector,
{
LUDirector: Value,
ID: Id
}
)

 

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@GoGorilla,

    Could you please share a bit more about the scenario? A screenshot would be appreciated.

    1). Is the LUDirector a Lookup column type?

    2). Is the LUDirector filtered by the value in the Division field? (Please ensure the consistency of the column name)? 

    Besides, if the error code 500 or 502 appears, the failure is temporary or transient. Click or tap Resubmit to try the flow again.

    Please provide more details and we would provide proper workaround for you.

    Regards,

    Qi

     

     

     

  • GoGorilla Profile Picture
    160 on at

    @v-qiaqi-msft I am getting the error " Your post has been changed because of invalid HTML was found in the message body".  I checked the HTML and nothing is wrong.  I will send in stages.

    @v-qiaqi-msft 

    1). Is the LU Director a Lookup column type?

    LU Director is a lookup column that allows multiple values (SEE ATTACHED)

     

    2). Is the LU Director filtered by the value in the Division field? (Please ensure the consistency of the column name)?

    LU Director is filtered by formula that starts with the Distinct function in my post in the Items property where DivisionDataCardValue11 is the Division choice field.

     

    The error is not transient or temporary as it has been happening for 5 days.  Please see Form and Gallery attachment where it is now saving to the form correctly but not submitting to the SharePoint list Onboarding (data source).   EDIT:  It is not saving once I open another item in the gallery.  When I go back into the item I previously submitted, I am seeing what is in the imgFormBlank attachment.

     

    Also, this is a PowerApps form not a PowerAutomate flow.  I noticed that you said to resubmit to try the flow again.  Maybe you were referring to the submitting of the form?

    imgFormBlank.png
    imgGallery.png
    imgLUDirector.png
  • GoGorilla Profile Picture
    160 on at

    @v-qiaqi-msft Have you had a chance to take a look at this?  I am sure you are very busy so I apologize for being so pushy.  I am very frustrated because nothing I am coming across is a solution.  Also to note, I do not have more than 12 complex columns in my SharePoint list.

  • Verified answer
    GoGorilla Profile Picture
    160 on at

    @v-qiaqi-msft After working with Microsoft, we found a solution:

    The app was not inserting the object(ID and Value) of the items in the lookup into the column, but we were trying to do strings/arrays. After we updated the code to create a collection of objects we were able to get this working.
    The code we updated was broken into two parts:
     
    To make this app able to do multiple selects, we create a collection instead
    OnChange of dropdown control:
    Clear(CollectionName);
    ClearCollect(CollectionName, DataCardValue.SelectedItems)

    Update of dropdown control (CARD: LUDirector).  Note that the datasource in this is NOT the main datasource (Onboarding), but the data source to which the lookup column refers (DivisionDirector) and the field name in that data source (txtDirector) as opposed to LUDirector:
    ForAll(colname, (Id: Lookup(datasource,Fieldname=Result).ID,
    Value: Lookup(datasource,Fieldname=Result).Fieldname)


    These changes replace those values with the actual objects that would be added and adds them to the SharePoint list.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard