SOLVED

SubmitForm not working with auto-generated DataCard

%3CLINGO-SUB%20id%3D%22lingo-sub-825320%22%20slang%3D%22en-US%22%3ESubmitForm%20not%20working%20with%20auto-generated%20DataCard%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-825320%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20afternoon%20everyone!%20I'm%20running%20into%20an%20issue%20where%20I'm%20trying%20to%20call%20%60SubmitForm(Form1)%60%20with%20Form1%20being%20a%20SharePoint%20list%2C%20and%20I'm%20getting%20an%20error%20message%20saying%20I%20need%20to%20add%20the%20Title%20field.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20what%20the%20form%20looks%20like%20before%20submitting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128785i42C37DE5FC64B50A%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22PowerApp-SharepointList-BeforeSubmit.PNG%22%20title%3D%22PowerApp-SharepointList-BeforeSubmit.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20%22TaskName%22%20DataCardValue%20generates%20a%20task%20name%20with%20%60User().FullName%20%26amp%3B%20%22-%22%20%26amp%3B%20Now()%60%20but%20it%20will%20not%20update%20when%20clicking%20the%20SubmitForm%20button%20and%20gives%20me%20the%20following%20error.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128782i09C5DCBF9C27A430%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22PowerApp-SharepointList-AfterSubmit.PNG%22%20title%3D%22PowerApp-SharepointList-AfterSubmit.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20cannot%20make%20the%20%22Task%20Name%22%20an%20optional%20item%20(Sharepoint%20makes%20it%20required)%20so%20I%20was%20wondering%20if%20anyone%20had%20come%20up%20with%20a%20solution%20for%20this%3F%20The%20Task%20Name%20is%20irrelevant%20to%20us%20so%20I%20was%20hoping%20to%20just%20submit%20an%20auto-generated%20name.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-825320%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20List%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-827926%22%20slang%3D%22en-US%22%3ERe%3A%20SubmitForm%20not%20working%20with%20auto-generated%20DataCard%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-827926%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F203961%22%20target%3D%22_blank%22%3E%40Brandon%20McGinnis%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20%22%3CSPAN%3ETitle%22%20field%20is%20usually%20required%20in%20most%20SharePoint%20lists.%20If%20you%20are%20not%20using%20the%20Title%20field%2C%20set%20%22Require%20that%20this%20column%20contains%20information%22%20to%20%22No%22.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIf%20you%20don't%20see%20a%20%22Title%22%20column%20then%20it%20has%20probably%20been%20renamed%20(Task%20Name%3F).%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20hope%20this%20helps.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ENorm%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-828126%22%20slang%3D%22en-US%22%3ERe%3A%20SubmitForm%20not%20working%20with%20auto-generated%20DataCard%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-828126%22%20slang%3D%22en-US%22%3ECheck%20the%20%22Update%22%20property%20on%20that%20Task%20Name%20Data%20card.%20If%20the%20field%20name%20or%20field%20should%20show%20%22Title%22%20then%20you%20know%20it's%20the%20title%20column.%20%3CBR%20%2F%3E%3CBR%20%2F%3EAnyway%2C%20in%20the%20Update%20property%2C%20you%20need%20to%20put%20the%20User().FullName%20%26amp%3B%20%22-%22%20%26amp%3B%20Now()%3CBR%20%2F%3E%3CBR%20%2F%3EThat%20way%20it%20gets%20that%20value%20for%20the%20update%20when%20you%20envoke%20SubmitForm.%3C%2FLINGO-BODY%3E
Contributor

Good afternoon everyone! I'm running into an issue where I'm trying to call `SubmitForm(Form1)` with Form1 being a SharePoint list, and I'm getting an error message saying I need to add the Title field.

 

This is what the form looks like before submitting.

 

PowerApp-SharepointList-BeforeSubmit.PNG

 

The "TaskName" DataCardValue generates a task name with `User().FullName & "-" & Now()` but it will not update when clicking the SubmitForm button and gives me the following error.

 

PowerApp-SharepointList-AfterSubmit.PNG

 

 

 

 

I cannot make the "Task Name" an optional item (Sharepoint makes it required) so I was wondering if anyone had come up with a solution for this? The Task Name is irrelevant to us so I was hoping to just submit an auto-generated name.

2 Replies
best response confirmed by Brandon McGinnis (Contributor)
Solution

Hi @Brandon McGinnis,

 

The "Title" field is usually required in most SharePoint lists. If you are not using the Title field, set "Require that this column contains information" to "No". 

 

If you don't see a "Title" column then it has probably been renamed (Task Name?).

 

I hope this helps.

 

Norm

Check the "Update" property on that Task Name Data card. If the field name or field should show "Title" then you know it's the title column.

Anyway, in the Update property, you need to put the User().FullName & "-" & Now()

That way it gets that value for the update when you envoke SubmitForm.