Hello,
I have a form with combo boxes that pulls data from one table, but when I save the form, I'd like to update the same fields in another table.
Consider these two tables using Sharepoint List as the datasource:
Table1:
Region VP Director Manager
North Mary Barbara Richard
South Paul Jim Louise
South Paul Jim Joe
South Paul Jim Mary
South Paul Jim Joanne
East Tom Sam Deborah
...
Table2:
Messages Director Manager
Item1 Jim Louise
Item2 Jim Louise
Item3 Jim Louise
Item4 Jim Joe
Item5 Jim Mary
Item6 Barbara Richard
..
I have created a form that will allow me to create new entries in Table2. The form consists of multiple combo boxes and text inputs for various other columns along with what is shown above. The datasource for the form is "Table2". In the form, I have it configured that if I select "Joanne" as the Manager, then the VP and Director pulldowns will automatically populate their entries from a lookup referencing Table1, so that the user doesn't need to fill that info in by hand.
I am doing the automatic population by setting the "Default" and "DefaultSelectedItems" entries for the DataCard as follows:
{Value:LookUp(Table1,Manager=managerDataCardValue.Selected.Result).Director} for the Director
and
{Value:LookUp(Table1,Manager=managerDataCardValue.Selected.Result).VP} for the VP
However, when I "Save" the form using "SubmitForm(FormName);" Table2 does not write the Director's name or VP's name to the proper fields. It only adds the Manager and the Message (along with all other fields). Both the Director and the VP are blank in Table2.
I thought that maybe this might be due to the referencing two datasources, so I created two new datacards on the same form that were combo-boxes mapped to the Director and VP fields in the form. I then set the "Default" value for this entry to match the
VPDataCardValue.Selected.Result
This combo-box references Table2 and copies the selected VP from the other combo-box that does a lookup value from Table1, so when the form saves, I thought it would put the data in Table 2, but it did not.
Anyone have any thoughts on how best to do this? I am nervous adding columns to an already very large table.
Thanks in advance!