Hi @slhangen ,
Do you want to patch a collection to your sharepoint list?
Could you tell me:
1)ddContactType combo box's Items?
2)what is InputContactType?
3)you said "ColContactType: is coming from a Lookup ComboBox called ddContactType", why you use "InputContactType.Text" to update ColContactType field in your collection?
4)the data type of LogContactType in your list?
Firstly, the right syntax of ForAll function should be like this:
ForAll(ColAddContact,
Patch('AT HOME LEARNING STUDENT CONTACT LOG',
Defaults('AT HOME LEARNING STUDENT CONTACT LOG'),
{LogOtherID: ColOtherID,
LogStudentLastName: ColStudentLastName,
LogStudentFirstName: ColStudentFirstName,
LogContactDate: ColContactDate,
LogContactType:....
LogContactPerson: ColContactName,
LogNotes: ColNotes,
LogContactMade: ColContactMade}
)
)
Secondly, about LogContactType field.
1)If combo box's Items is: Choices(list1.field1)
field1 is a lookup field
Then you should update your collection like this:
My Collection:
ClearCollect(
ColAddContact,
{
ColOtherID: InputOtherID.Text,
ColStudentLastName: InputStudentLastName.Text,
ColStudentFirstName: InputStudentFirstName.Text,
ColContactDate: ContactDatePicker.SelectedDate,
ColContactType: ddContactType.Selected,
ColContactName: InputContactName.Text,
ColContactMade: tgContactMade.Value,
ColNotes: InputNotes.Text};
);
If LogContactType is lookup type, looked up to field1 in list1, the patch function:
ForAll(ColAddContact,
Patch('AT HOME LEARNING STUDENT CONTACT LOG',
Defaults('AT HOME LEARNING STUDENT CONTACT LOG'),
{LogOtherID: ColOtherID,
LogStudentLastName: ColStudentLastName,
LogStudentFirstName: ColStudentFirstName,
LogContactDate: ColContactDate,
LogContactType:ColContactType
LogContactPerson: ColContactName,
LogNotes: ColNotes,
LogContactMade: ColContactMade}
)
)
2)If combo box's Items is: Choices(list1.field1)
field1 is a lookup field
If LogContactType is text type, looked up to field1 in list1, the patch function:
ForAll(ColAddContact,
Patch('AT HOME LEARNING STUDENT CONTACT LOG',
Defaults('AT HOME LEARNING STUDENT CONTACT LOG'),
{LogOtherID: ColOtherID,
LogStudentLastName: ColStudentLastName,
LogStudentFirstName: ColStudentFirstName,
LogContactDate: ColContactDate,
LogContactType:ColContactType.Value
LogContactPerson: ColContactName,
LogNotes: ColNotes,
LogContactMade: ColContactMade}
)
)
Anyway, you need to use different formulas based on your settings of combo box and data type.
Best regards,