cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CarlHRVA
Continued Contributor
Continued Contributor

data from custom form not being submitted to SharePoint list

I have a custom form I created for a list in SharePoint that is not behaving as expected and I could really use some help! I have 4 choice columns in my list: State, Hotel Name, Inn Code and Facility ID. In my custom form, I've added a data source, edited the choices to come from my new data source(a Master Property List) and set up a cascading drop-down from State>Hotel>Inn Code + Facility ID. This all works as intended in the form in SharePoint but when I save my new entry all 4 fields come up blank. As a side note, there is a lot of data in the list/these columns but when I try to filter them I only receive the default choices(Enter Choice #1,Enter Choice #2,Enter Choice #3). Any help is greatly appreciated!Capture.PNG

 

Capture2.PNG

 

18 REPLIES 18
CarlHRVA
Continued Contributor
Continued Contributor

@v-xida-msftin this thread here  they mention needing to patch if using a look up? But I haven't been able to figure out how/where to use that formula...

Hi @CarlHRVA ,

Do you change the data type of your Choice columns into LookUp Data type?

 

Based on the needs that you mentioned, I think it is not necessary to convert the Choice type into LookUp type. Please make sure these fields (State, Hotel Name, Inn Code and Facility ID) are all Choice type fields rather than LookUp type fields in your SP List.

 

If these fields (State, Hotel Name, Inn Code and Facility ID) are all Choice type fields in your SP List, I think the solution I provided above could achieve your needs. Please take a try with it.

 

If you have change these fields data type into LookUp already, please modify the Update property of the State field data card to follwing:

{
  Id: LookUp('Master Property List', State = StateComboBox.Selected.Result, ID),
  Value: StateComboBox.Selected.Result
}

Hotel Name field data card Update property:

{
  Id: LookUp('Master Property List', 'Property (PIM Short Name)'= HotelNameComboBox.Selected.Result, ID),
  Value: HotelNameComboBox.Selected.Result
}

Inn Code field data card Update property:

{
  Id: LookUp('Master Property List', Inncode = InnCodeComboBox.Selected.Result, ID),
  Value: InnCodeComboBox.Selected.Result
}

Facility ID field data card Update property:

{
  Id: LookUp('Master Property List', 'Facility ID' = FacilityIDComboBox.Selected.Result, ID),
  Value: FacilityIDComboBox.Selected.Result
}

 

If you still have some issues with your scenario, maybe a quick call via Teams would be better. Please feel free to contact me.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CarlHRVA
Continued Contributor
Continued Contributor

@v-xida-msftthank you so much for this. I did change the data source to a look up and I am close but still having some issues. Any chance you're still around? Thank you again.

Hi @CarlHRVA ,

Based on the needs that you mentioned, I think the solution I provided above could achieve your needs. Could you please show more details about the issue within your app?

 

Please note that if change the data type of these Choice fields in your SP List, the changes would not take effect immediately within your canvas app. In order to make these changes take effect within your app, you need to refresh the SP List data source within your app manually, then remove the Edit form from your app, then re-add a new one (Edit form) again, connect it to your SP List, enable these fields within this new Edit form, try above formula I provided, check if the issue is fixed.

 

In addition, you could also consider re-generate a new app based on your SP List, then apply above formula I provided into your Edit form, then check if the issue is solved.

 

If you have enabled "Allow Multiple" option for these LookUp fields in your SP List, you need to modify the formula within the Update property of the LookUp field data card to following:

Update property of State field data card:

ForAll(
       StateComboBox.SelectedItems,
       {
         Id: LookUp('Master Property List', State = Result, ID),
         Value: Result
       }
)

Update property of Hotel Name field data card:

ForAll(
       HotelNameComboBox.SelectedItems,
       {
         Id: LookUp('Master Property List', 'Property (PIM Short Name)'= Result, ID),
         Value: Result
       }
)

same logic for other two ComboBox controls in your Edit form

...

....

If you still have issue within your app, I think a quick call in Teams may help in your scenario. Please feel free to contact me if you are available.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

CarlHRVA
Continued Contributor
Continued Contributor

@v-xida-msft I am still having issues. It's telling me there is an invalid argument type. I had this all working and then I come back to edit a different field and suddenly none of the look up fields are working. Certainly open to a Teams call, tried messaging you directly. Please help, this is extremely frustrating and causing significant delays in production. 

CarlHRVA
Continued Contributor
Continued Contributor

Figured this out. Someone changed the names of the columns in SharePoint which broke the formulas. Thanks

 

CarlHRVA
Continued Contributor
Continued Contributor

Still having issues with the Hotel Name column. Anyone have any idea why this name isn't valid? 

 

Capture.PNG

CarlHRVA
Continued Contributor
Continued Contributor

Still really struggling with this...I've been able to get different variations of the formula to work and at one point it saved a value to the list but the value was different than the value that was selected in the drop down. My current formula for the Update property for the Hotel Name look up column looks like this: 

 

Capture.PNG

 

The items property for Hotel Name looks like the below. It properly filters my available Hotels but the value that gets saved to the list is either blank or the wrong Hotel:

 

Capture.PNG

Thank you for any and all help.

 

 

 

CarlHRVA
Continued Contributor
Continued Contributor

@v-xida-msft Can someone please help me? I have been unable to complete this form for weeks now and it's really impacting the business. I've tried every possible combination/function I can think of. Should I just hire someone to look at this for me? 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (28,864)