cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
automationWiz
Frequent Visitor

Auto-Populate Title Field of SharePoint Form Control based on Text Concatenation

Hello,

 

I am attempting to auto-populate a Title field of a SharePoint List Form Control on my PowerApp based on fields selected in other parts of the form.  I have set the Default property of the data card as seen below, and have updated the DataCardValue as well so that the proper entry displays in the field. The field is unlocked, not-editable.  Despite the formula working properly.  I still receive the error when I use the SubmitForm(FormName) command in my button control.  See images below.  I have researched other similar topics on the help forums and have had no success in implementing similar solutions. For example, there is no Update field on my Title Data Card...

 

Can someone please help troubleshoot? Thanks in advance for your help.

 

automationWiz_2-1669626261183.png

 

automationWiz_1-1669626224138.png

automationWiz_3-1669626375177.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @WarrenBelz,

 

I figured out the problem using your last suggestion as guidance.  At some point in my editing of the formatting of the form control and setting up the concatenated string, the title value box was changed to a label type and it was not connected to the form.  I deleted the form control, re-added it and the SubmitForm command now works with the concatenated string.  

 

Thank you for all the help along the way.

View solution in original post

9 REPLIES 9
WarrenBelz
Super User
Super User

Hi @automationWiz ,

Apart from having an extra bracket at the end, maybe separating the calculating as below

With(
   {
      wID:
      Last('TCW Feedback Log').ID + 1
   },
   "REQ_" & DataCardValue2.Selected.Value & Text(wID)
)

 

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.

Visit my blog Practical Power Apps

automationWiz
Frequent Visitor

Hi @WarrenBelz,

 

Thanks for the quick reply.  Unfortunately swapping this code in both the DataCardValue control and the data card itself still returns the same error shown in the third original image.  It seems the patch function is not recognizing the calculated value as input?

Hi @automationWiz ,

Now I have looked more closely at your screen shots, it is nothing to do with this calculation. The error is that your Title field requires a value - if you are not using it, go into the SharePoint List Settings and make it not required.

 

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.

Visit my blog Practical Power Apps

Hi @WarrenBelz,

 

Thanks for the suggestion.  The Title column is the default "index" column in my SharePoint list, so its "required" property cannot be toggled off.  In addition, I am using this column.  Essentially I am trying to have the PowerApp auto-generate a ticket number for the form content and place this into the Title column upon using the SubmitForm command.  The only difference is they are not typing it in manually it is calculated by the Concatenate function.

 

Cheers--

Hi @automationWiz ,

What field is your code on ? It needs to be the Title field.

Hello @WarrenBelz ,

 

My code is in both the Text property of the DataCardValue13 box (within the Title card), and the Default property of the Title_DataCard3.  I've attached images below.

 

Thank you--

 

automationWiz_0-1669794633575.png

automationWiz_1-1669794675027.png

 

 

 

WarrenBelz
Super User
Super User

Hi @automationWiz ,

Your Text property should be in the Default of the Text Box (and nothing in Text) and the Default of the Data Card should be ThisItem.Title.

 

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.

Visit my blog Practical Power Apps

Hi @WarrenBelz,

 

I figured out the problem using your last suggestion as guidance.  At some point in my editing of the formatting of the form control and setting up the concatenated string, the title value box was changed to a label type and it was not connected to the form.  I deleted the form control, re-added it and the SubmitForm command now works with the concatenated string.  

 

Thank you for all the help along the way.

ViviQueen
Frequent Visitor

Hi everyone, I have a challenge with my combobox which has to look up and compare its values with the DataCardValue4 selected result. It is not updating when I use distinct:

Distinct(Filter(Choices([@ListA],TestScore), Value in Filter([@Students],TestScores=DataCardValue4.Selected.Result).TestScores),Value)

 

Can anyone please help me with a solution, I have tried to change its update properties using many suggestions but none seems to work.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,264)