Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Patching items from Pick List

(1) ShareShare
ReportReport
Posted on by 13
Hi all,
 
I have an issue whereby I cannot patch ALL selected items from a pick list (From SharePoint List A "Maintenance Questions") and write them to List B "Planned Maintenance Submissions".
 
I have 5 fields that I wish to Patch to "Planned Maintenance" which technically works, however, when I select multiple items from a Pick List (lstActivity) the Patch function only passes through the final item you selected. For example, if you pick, A,B, C and G; only item G will appear in the SharePoint list even though the others are selected. My formula is:
 
    Patch(
        'Planned Maintenance Submissions',
        Defaults('Planned Maintenance Submissions'),
        {
            Title: txtName.Text,
            Machine: drpMachines.Selected.Value,
            'Maintenance Type': drpType.Selected.Value,
            'Maintenance Activity': lstActivity.Selected.Value,
            Comments: txtComments.Text
        }
    );
    Reset(txtName);
    Reset(drpMachines);
    Reset(drpType);
    Reset(lstActivity);
    Reset(txtComments);
    Navigate(scrSuccess)
 
I have also tried to "trick" Power Apps by Concatinating the selected items into an invisible text box which would be patched instead of the pick list:
 
Concat(lstActivity.SelectedItems, ", ")
 
This doesn't work either and whilst the box appears to see items are selected, they do not show and appear as " , , , "
 
I have also looked at using a collection but cannot get this to work either.
 
Can anyone help please?
 
Thanks!
Categories:
  • JH-24070944-0 Profile Picture
    7 on at
    Patching items from Pick List
    Hi,
    it seems like 'Maintenance Activity" expects a Data - Value.
    But since you can choose multiple values in 'lstActivity' the selected Items are a Record.
    This can not be matched to a Data field because a Record consists of multiple Data-entries.
    This ist why you had to use 'selected.value' in first place.
     
    With the Concat you are combining the values of the 'selectedItems' to one Data (in this case a String).
    This is why your solutions works.
    Best regards
  • JS-24070703-0 Profile Picture
    13 on at
    Patching items from Pick List
    I have figured this out if anyone comes across it in the future. I added Concat to my Patch formula on the submit button:
     
        'Maintenance Activity': Concat(lstActivity.SelectedItems,Value&","),

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard