cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ITguy
Level: Powered On

Creating a New Record in Sharepoint that has Multiple Controls in Powerapps DataCard

Alright guys,

 

This one gets a little complicated so bear with me and follow my argument:

 

I am creating an app used by Manager Mike to submit a "New Personnel Requisition" request to HR Holly. 

 

Manager Mike needs to indicate the hours of the shift, and on what days of the week the shift is. 

 

Manager Mike submits the form through PowerApps into a Sharepoint List. To make the process simple for data entry for Manager Mike, I have created a data card within the app with MULTIPLE dropdowns and checkboxes in the SAME data card. 

 

My problem is that I do not know how to combine the values from the multiple controls into a single line of text when the form is submitted (aka what do I write in the DataCard 'Update' box):

 

Here are what the controls look like (and their corresponding names) within the Data Card:

 

controls.JPGcontrols.names.JPG

 

Upon Form Submission from the app, I would like it to update a text column called ShiftTime with the following format (replace formula names with the variable selected obviously):

 

START(hour):START(min) START(am/pm) - END(hour):END(min) END(am/pm) on (whatever day boxes are checked)

 

Can anybody help me with this - I have tried google/bing/yahoo/this forum/asking my sweet granny and cannot figure it out. I really appreciate it guys. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Creating a New Record in Sharepoint that has Multiple Controls in Powerapps DataCard

So my quick test works. Maybe I am missing something? Note: This is not a proper working app. There would be issues with what I did but it should prove this one concept.

 

Here is what I did:

 

  1. Created an app from a SharePoint list (to make this go faster)
  2. Went to EditScreen1 > EditForm1
  3. Found that FavoriteColor is DataCardValue11
  4. Found that Department is DataCardValue12
  5. Unlocked the Title data card
  6. Changed the Default for Title from Parent.Default to DataCardValue11.Text & " - " & DataCardValue12.Text
  7. Went back to BrowseScreen1
  8. Clicked Preview
  9. Clicked the + icon
  10. Filled in FavoriteColor with Red and Department with IT
  11. Title's data box populated Red - IT
  12. Pressed the checkmark icon to submit my form. Success!
  13. Checked SharePoint list and the title was Red - IT

Am I missing something? Seems like what you folks are trying to accomplish but maybe not?

 

Shane

 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Creating a New Record in Sharepoint that has Multiple Controls in Powerapps DataCard

In this post, 2 people are asking almost the same exact question. https://powerusers.microsoft.com/t5/General-Discussion/Auto-populate-Title-field-from-other-fields-o...

 

@sweetwaterbrew and @ATLTEK

 

Guess since that makes three of you I will dig in and see what I can come up with. I know one way to solve it but it is not elegant. Let me spend a few minutes and see if I can do better. 

 


Shane

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
Super User
Super User

Re: Creating a New Record in Sharepoint that has Multiple Controls in Powerapps DataCard

So my quick test works. Maybe I am missing something? Note: This is not a proper working app. There would be issues with what I did but it should prove this one concept.

 

Here is what I did:

 

  1. Created an app from a SharePoint list (to make this go faster)
  2. Went to EditScreen1 > EditForm1
  3. Found that FavoriteColor is DataCardValue11
  4. Found that Department is DataCardValue12
  5. Unlocked the Title data card
  6. Changed the Default for Title from Parent.Default to DataCardValue11.Text & " - " & DataCardValue12.Text
  7. Went back to BrowseScreen1
  8. Clicked Preview
  9. Clicked the + icon
  10. Filled in FavoriteColor with Red and Department with IT
  11. Title's data box populated Red - IT
  12. Pressed the checkmark icon to submit my form. Success!
  13. Checked SharePoint list and the title was Red - IT

Am I missing something? Seems like what you folks are trying to accomplish but maybe not?

 

Shane

 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

sweetwaterbrew
Level: Powered On

Re: Creating a New Record in Sharepoint that has Multiple Controls in Powerapps DataCard

That sounds exactly right. I really appreciate your help. When I tried on the other post, the title is a required field, and when I fill in the two fields, the title doesn't populate. When I click submit, it fails because of the required title field. If I open the existing items in edit mode, the title field populates with desired results.

I'm try a completely new form and see if I get different results. It's already a new form, but with all the testing, maybe I screwed something up and don't remove changes.
Super User
Super User

Re: Creating a New Record in Sharepoint that has Multiple Controls in Powerapps DataCard

Cool. Keep us posted. 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
sweetwaterbrew
Level: Powered On

Re: Creating a New Record in Sharepoint that has Multiple Controls in Powerapps DataCard

OK--- I figured out where we went wrong. I was not using the "DataCardValue#.Text", but I was using the field name. Argh!!!

It's working now.

Thanks so much @Shanescows LMK if you wanna swing by for a cold brew in Atlanta.

 

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,063)