On success error
On success error
Hi,
I'm a newbie trying to get one form to update a date list in another on success. The form I'm trying to update is a Vendor form. The form I'm submitting from is our monthly meeting form. We can use multiple vendors at each meeting (Vendor 1, Vendor 2, etc). I want the Vendor page to include a list of the dates that we've used them (so in the Vendor view I can link back to the monthly meeting view for that date to get more details), but I only want one date in that form, no matter which vendor "number" they were at our event.
I've worked out the following code but it gives me this error:
"Invalid entries found. Please correct and submit again." With further detail appearing on the form page:"Error occured while executing on edit -success script. Unable to update date on the form variable. Error on Form."
This only happens on the the first attempt to hit submit. If I hit submit again, it works fine and updates the Vendor record in the desired fashion. Any ideas why this is happening?
Here is the code:
- r = Vendors [((Vendor_Name = input.Vendor_1 || Vendor_Name = input.Vendor_2) || Vendor_Name = input.Vendor_3)];
- tempdatelist1 = List:Date();
- tempdatelist1 = r.Monthly_Meeting_Dates.getall();
- tempdatelist1.add(input.Date_field);
- r.Monthly_Meeting_Dates = tempdatelist1;
Thanks,
Jim