Skip to main content

Notifications

Power Apps - Power Apps Experimental Features
Suggested answer

obtaining both multi selection drop down choices AND manually added values

(0) ShareShare
ReportReport
Posted on by 4
Good evening.  I am new to Power Apps and am trying s Custom Form for a SP List.  I have a column that is a drop down, multi-select choices.  It is also a mandatory field and is to allow multiple selections.  At the present, I can EITHER obtain a "custom" (manual) choice back to the SP List OR the drop-down item(s), but not BOTH.  My formula in the update field is:  
If(!IsBlank(DataCardValue2.SelectedItems),DataCardValue2.SelectedItems,
If(!IsBlank(DataCardValue2.SearchText),{Value: DataCardValue2.SearchText},
Blank()))
 
How can I get BOTH values of the manual choice AND the drop-down item(s)?
  • WV-13122326-0 Profile Picture
    WV-13122326-0 4 on at
    obtaining both multi selection drop down choices AND manually added values
    Thanks again, Warren; I am most appreciative.  That method is way over my head. 
     
    Just to clear up any misunderstanding, all I am trying to do is mimic what a Default input SP form can do when you select  "+ Add new item" and have a drop-down choice column with manual values feature.  In the high-lighted example below, the column called Project Status has three drop-down choices of Planning, In Progress, and Complete.  In this example, I chose from the drop-down In Progress and Planning.  I was also allowed to manually input the text "Custo" since this column has the box checked that says "can add values manually".  You can see what the result was below; three choices separated by commas with one choice being custom manually added.  I am trying to mimic this feature in the Integrate, Power Apps, Custom Forms feature.  Would I still need to do your method or something else now that you know exactly what I am aiming for? 
     
     
     
  • WarrenBelz Profile Picture
    WarrenBelz 143,867 on at
    obtaining both multi selection drop down choices AND manually added values
    Unfortunately there is no way to do that with a Choice column (you cannot write back to the choices - they are hard-coded in SharePoint). You are going to need a reference list with one column for your values (just ignore whatever is in the choices now) and change the Items of the Combo Box to
    YourReferenceList.YourListField
    You would use the code I supplied on the Update, however just before you submit the Form, you would run this (the With() statement is only to avoid the Delegation warning)
    With(
       {_Data: YourReferenceList},
       If(
          !(DataCardValue2.SearchText in _Data.YourListField) && Len(DataCardValue2.SearchText) > 0,
          Patch(
             YourReferenceList,
             Defaults(YourReferenceList),
             {YourListField: DataCardValue10.SearchText}
          )
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • WV-13122326-0 Profile Picture
    WV-13122326-0 4 on at
    obtaining both multi selection drop down choices AND manually added values
    Thanks Warren for the quick response.  I input your Table formula in the Update field of the datacard and unfortunately, it did not do what I need.  I need to obtain a "custom" (manual) choice back to the SP List AND the drop-down item(s).  So for example, If I choose "Choice 1" and input "Custom", I am looking to obtain "Choice 1, Custom" back in the display and, of course, back into the SP list.  I don't need the comma, but would be nice to have.
  • Suggested answer
    WarrenBelz Profile Picture
    WarrenBelz 143,867 on at
    obtaining both multi selection drop down choices AND manually added values
    Try this - works here when tested - you need to add the SearchText last when inputting.
    Table(
       {Value: DataCardValue2.SearchText},
       DataCardValue2.SelectedItems
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,174

Leaderboard

Featured topics