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 / Print Multiple lines t...
Power Apps
Unanswered

Print Multiple lines to Share Point from a List Box

(0) ShareShare
ReportReport
Posted on by 6

I have a Shape Point List that I want to update from a list box and individual data cards.

I need the Employee, Badge #, and Date to fill in for how ever many check boxes are checked.

And each one should have its own line, as in example.

Joe_W_G_0-1617653121038.png

Joe_W_G_1-1617653163655.png

 

 

Categories:
  • WarrenBelz Profile Picture
    156,967 Most Valuable Professional on at

    @Hi @Joe_W_G ,'

    I assume there are two check boxes here

    If(
     CheckboxBame1.Value,
     Patch(
     YourListName,
     Defaults(YourListName),
     {
     Employee:YourEmployeBox.Text,
     Badge: YourBadgeBox.Text,
     Date:DateValue(YourDateBox.Text),
     YourCheckField1:CheckBoxName1.Value
     }
     )
    )

    then repeat tot he second box

     

    Please click Accept as solution 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 Thumbs Up.

  • Joe_W_G Profile Picture
    6 on at

    This still is not working. Could it be that I have the check boxes going into  list box after they have been clicked., and before the Submit.

    OnCheck(Collect(Collection2, {Value: "Set up Roll-a-Bon poles"})  ??

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    I believe many checkboxes on the same list?

     

    1. If many checkboxes on the one list item then make sure No patch on the checkbox select command. Patch command on "Submit" button only

    2. If many checkboxes on different list then use patch command with lookup

  • WarrenBelz Profile Picture
    156,967 Most Valuable Professional on at

    @Joe_W_G ,

    If your List Box is based on Collection2, then yes, it goes there as soon as the box is checked.

  • WarrenBelz Profile Picture
    156,967 Most Valuable Professional on at

    Hi @Joe_W_G ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution 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 Thumbs Up.

  • Joe_W_G Profile Picture
    6 on at

    Error 1 - The If function has invalid arguments.

    Error 2 - The Patch function has invalid arguments.

    Error 3 - the Defaults functions has invalid arguments.

     

    This is the code I have input in the submit button.

    Plus after this, I have 10 checkbox values to consider  passing into the Collections2 List box.

    Is this still the best option.


    If(Checkbox1.Value=true,
    Patch(Cultivation Opening Checklist, Defaults(Cultivation Opening Checklist),
    {
    Employee:DataCardValue7.Text,

    Badge:DataCardValue3.Text,

    Date:DateValue(DataCardValue8.text),
    Tasks:Checkbox1.Value.Text } ) )

  • WarrenBelz Profile Picture
    156,967 Most Valuable Professional on at

    HI @Joe_W_G ,

    Firstly, the syntax below is valid assuming: -

    • Employee and Badge are Text Fields in your data source
    • Date (not a good name for a field as it is a Reserved Word in Power Apps) is a Date field and you have a valid date format in your text input
    • Tasks is a text field (and note the code correction I have done here)
    If(
     Checkbox1.Value,
     Patch(
     'Cultivation Opening Checklist', 
     Defaults('Cultivation Opening Checklist'),
     {
     Employee:DataCardValue7.Text,
     Badge:DataCardValue3.Text,
     Date:DateValue(DataCardValue8.Text),
     Tasks:Text(Checkbox1.Value) 
     }
     )
    )

    Is all of that correct?

    Also note the single quotes ' around your list name.

     

    Please click Accept as solution 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 Thumbs Up.

     

     

  • WarrenBelz Profile Picture
    156,967 Most Valuable Professional on at

    Hi @Joe_W_G ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution 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 Thumbs Up.

  • Joe_W_G Profile Picture
    6 on at

    No not yet. I did change a few of the titles as you mentioned.

    Still not pulling the info to share point.

    If I hide the code and do a SubmitForm, It does pull the Employee, Badge and Date, but not the Checkbox Text. So some wants to work.

    Also,  When I click on the code to find error I get:

    Patch(source, record, update,...)

    record(The record that has to be patched.

    also;

    The function 'Patch has some invalid arguments.

    The specified column 'Author' does not exist.

     

     

    If(
    Checkbox1.Value,
    Patch(
    Collection2,
    Defaults('Cultivation Opening Checklist'),
    {
    Employee:DataCardValue2.Text,
    Badge:DataCardValue1.Text,
    OpDate:DateValue(DataCardValue8.Text),
    OpTasks:Text(Checkbox1.Value) } ) )

     

    then also on the app checker I get issues like:

    Name isn't valid. This identifier isn't recognized.

    The error appears most commonly when a formula refers to something that no longer exists

    LOCATION

    SubmitButton.OnSelect

  • WarrenBelz Profile Picture
    156,967 Most Valuable Professional on at

    Hi @Joe_W_G ,

    My code was Patching a new record to a list - if you want to add an item to a collection

    If(
     Checkbox1.Value,
     Collect(
     Collection2,
     {
     Employee:DataCardValue2.Text,
     Badge:DataCardValue1.Text,
     OpDate:DateValue(DataCardValue8.Text),
     OpTasks:Text(Checkbox1.Value) 
     }
     )
    )

    Also the error appears to be something to do with one of your four controls - which one is referenced?

     

    Please click Accept as solution 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 Thumbs Up.

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

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard