cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PVLove
Helper V
Helper V

TextInput in DataCard Not Saving to SharePoint List

Hello All!

I'm building a form with drop-down controls converted to a gallery with checkboxes.
Those two controls are SharePoint Choice columns and both columns have the 'Checkboxes' & 'allow Fill-in choices' options selected: ChangeType and ChangeReason.

  • The gallery placed in the ChangeType datacard is ChangeTypeCKBoxes. The Checkbox added to the gallery has the following statement on the OnCheck property: Collect(colChangeType,ThisItem); and a statement on the OnUnCheck property: Remove(colChangeType,ThisItem).
  • The Checkbox Default property: ThisItem.Value in colChangeType.Value
  • The ChangeType datacard has the following statement in the Default & Update properties: colChangeType.
  • The ChangeReason datacard has similar properties/functions.
  • Both Choice columns have an 'Other' checkbox option.
  • I added a corresponding SingleText column for the 'Other' checkbox options: ChangeTypeOther and ChangeReasonOther.
  • I pasted a TextInput control, for the SingleText columns, into the drop-down control DataCards and renamed them, txtChangeTypeOther and txtChangeReasonOther.
  • I set the Default property for the txtChangeTypeOther to ThisItem.ChangeTypeOther.
  • I set the Default property for the txtChangeReasonOther to ThisItem.ChangeReasonOther.

The checkboxes are functioning as expected, however the fields for the 'Other' data do not save back to the SharePoint list when I submit the form. I've tried to Patch the 'Other' fields, but cannot get the Patch statement correct: Patch(TestPayroll, LookUp(TestPayroll, {ChangeTypeOther: txtChangeTypeOther.Text, ChangeReasonOther: txtChangeReasonOther.Text})); Screenshots attached.

Thank you for any assistance!

Patti

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@PVLove 

Yes, I understand...this is what we are getting to and thus the questions.

 

The general concept is this (assuming your gallery is now outside of the form):

1) You will need to utilize a variable or reference for the Item property of the form!  If you are setting a variable to the record to edit, then this is fine.  If you are referencing a control (like a Gallery.Selected), that is fine.  If you are doing a LookUp in the Item property, then this will need to be changed.  If any question on this, please provide your Item property for the form.

For the purpose of the rest of this instruction list, I will assume a variable and I will call it glbCurrentRecord.  Replace as appropriate.

2) The Gallery would have the same Items property as you have before.

3) In the Gallery, you will also have a TextInput control.  That control would have a Visible property set to:

    ThisItem.Value = "Other" && checkBoxName.Value

    It would have a Default property of: glbCurrentRecord.ChangeTypeOther

4) For your checkbox in the gallery: 

   The Default would be:  ThisItem.Value in glbCurrentRecord.ChangeType

   The Text property would be:  ThisItem.Value

5) In the ChangeType datacard in the form, the Update property would be:

    ForAll(Filter(yourGalleryName.AllItems, checkBoxName.Value), {Value: Value})

6) The Update property of the ChangeTypeOther datacard would be:

    LookUp(yourGalleryName.AllItems, checkBoxName.Text = "Other" && checkBoxName.Value, TextInputControlName.Text)

 

That is it.  It should all work then from there.  You can get rid of all the OnCheck and OnUncheck actions.  They are not needed.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

12 REPLIES 12
RandyHayes
Super User
Super User

@PVLove 

If this is in a Form, then there is no need for any Patch functions.

What is the Items property of your Gallery?

 

"I added a corresponding SingleText column for the 'Other' checkbox options: ChangeTypeOther and ChangeReasonOther."

In the above you mention that your column allows write-ins, but you seem to be then storing the write-in in another column in your data source all together - is there a reason for that?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes ,

Thank you for the super quick reply!!

 

The Items for each 'Checkbox' gallery is the corresponding Item for the SharePoint Choice column.

Gallery: ChangeTypeCKBoxes > Items > Choices([@TestPayroll].ChangeType)

Gallery: ChangeReasonCKBoxes > Items > Choices([@TestPayroll].ChangeReason)

 

I'm trying to store the information entered in the Text Input fields for the Other responses in the ChangeTypeOther and/or ChangeReasonOther columns in SharePoint.  That's where the problem is occurring.  Submitting the form does not populate those columns with text entered in those Text Input fields in the form.

Patti

RandyHayes
Super User
Super User

@PVLove 

Yes, so trying to determine your need then for the Choices column to allow write-ins if you are not utilizing that feature but instead putting them into the other column.

 

The unfortunate part about Galleries in a Form is that there is a bug with dealing with the gallery currently.  Ideally all of this should be done without any clumsy collections or actions as they all have to be dealt with in behavioral actions.

BUT, that cannot be done at this point because of the Gallery in a Form bug.  

It is MUCH better to put the Gallery outside of the form (it can still be on top of the form in a way that it looks completely the same as your current form).

The form can then reference that Gallery without any issues.

 

However, to get to the "other" text input control (I assume you have the TextInput control IN your gallery) in your gallery, you would *normally* get it with - LookUp(yourGallery.AllItems, Value="Other", yourTextInput.Text)  (which would then be the Update formula on your "other" column datacards.)

But, it is the AllItems that breaks in a form.  Put this outside and it will work like a charm.

 

Otherwise, you would need a way to do some behavioral action on the textinput in your gallery to capture the value entered into some variable and then use that for the Update property of the "other" column datacards in your form.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Fortunately, I'm working on a 'test' form and can move the Gallery over the form.  However, I 'pasted' the TextInput into the ChangeType datacard.  I tried pasting the ChangeTypeOther control into the ChangeType datacard, but that didn't work either.  I'll move it to he Gallery and see if I have any luck with that.

RandyHayes
Super User
Super User

@PVLove 

Yes, the general concept is fairly straight forward is the gallery is outside of the form.

A question first though...you show "Other" in your gallery.  Is "Other" one of the Choices defined in the underlying column choices, or are you injecting it into your gallery?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

'Other' is an option in the Choices column.  I have a SingleText column for the response to the 'Other' selection in the Choice column, but I'm lost on how to add it to the form and update the SharePoint list.

RandyHayes
Super User
Super User

@PVLove 

Yes, I understand...this is what we are getting to and thus the questions.

 

The general concept is this (assuming your gallery is now outside of the form):

1) You will need to utilize a variable or reference for the Item property of the form!  If you are setting a variable to the record to edit, then this is fine.  If you are referencing a control (like a Gallery.Selected), that is fine.  If you are doing a LookUp in the Item property, then this will need to be changed.  If any question on this, please provide your Item property for the form.

For the purpose of the rest of this instruction list, I will assume a variable and I will call it glbCurrentRecord.  Replace as appropriate.

2) The Gallery would have the same Items property as you have before.

3) In the Gallery, you will also have a TextInput control.  That control would have a Visible property set to:

    ThisItem.Value = "Other" && checkBoxName.Value

    It would have a Default property of: glbCurrentRecord.ChangeTypeOther

4) For your checkbox in the gallery: 

   The Default would be:  ThisItem.Value in glbCurrentRecord.ChangeType

   The Text property would be:  ThisItem.Value

5) In the ChangeType datacard in the form, the Update property would be:

    ForAll(Filter(yourGalleryName.AllItems, checkBoxName.Value), {Value: Value})

6) The Update property of the ChangeTypeOther datacard would be:

    LookUp(yourGalleryName.AllItems, checkBoxName.Text = "Other" && checkBoxName.Value, TextInputControlName.Text)

 

That is it.  It should all work then from there.  You can get rid of all the OnCheck and OnUncheck actions.  They are not needed.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
PVLove
Helper V
Helper V

Thanks!  I'm going to scrap this test form and start over in a clean app.  I have several test forms in this app and they are clashing.  I'll send you message Monday or Tuesday and let you know how far I get.

RandyHayes
Super User
Super User

@PVLove 

Sounds good!  Let me know how it turns out and have a great weekend!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!     Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!     Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!     UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!     European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!   Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!   For more events, click the image below to visit the Microsoft Community Days website.    

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip: Community User Groups

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: Community User Groups and YOU Being part of, starting, or leading a User Group can have many great benefits for our community members who want to learn, share, and connect with others who are interested in the Microsoft Power Platform and the low-code revolution.   When you are part of a User Group, you discover amazing connections, learn incredible things, and build your skills. Some User Groups work in the virtual space, but many meet in physical locations, meaning you have several options when it comes to building community with people who are learning and growing together!   Some of the benefits of our Community User Groups are: Network with like-minded peers and product experts, and get in front of potential employers and clients.Learn from industry experts and influencers and make your own solutions more successful.Access exclusive community space, resources, tools, and support from Microsoft.Collaborate on projects, share best practices, and empower each other. These are just a few of the reasons why our community members love their User Groups. Don't wait. Get involved with (or maybe even start) a User Group today--just follow the tips below to get started.For current or new User Group leaders, all the information you need is here: User Group Leader Get Started GuideOnce you've kicked off your User Group, find the resources you need:  Community User Group ExperienceHave questions about our Community User Groups? Let us know! We are here to help you!

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!  

Top Solution Authors
Top Kudoed Authors
Users online (5,664)