2014-01-17

Some Background:

(I wish I had more rep to flesh this out, as I would like to post images and links to my research).

I am using the Awesome Tables gadget on our company Intranet Portal (on Google Sites) for phone directories, page navigation, serial numbers and such. It is, well, Awesome!

The new project is to integrate the ability to add, and more importantly, edit/update Gmail Contacts directly from the intranet portal. I am using this example from the Awesome Tables site as my starting point.

What i need!:

A way for an edited Google Form to update a cell in the responses spreadsheet (on the correct Row) to "Needs Update". I have read that the code will need to reside in the Google Form for triggers to work (onFormSubmit doesn't work for editing if code is in spreadsheet).

Also, apologies for the code and if I am not phrasing coding terminology correctly, it is my first go at anything serious outside of some bash scripting. Also, if this can all be done some other way such that you can still have a "live" and editable reflection of your gmail contacts on a google site, I am open to that. Do please read on!

Where I am at:

Spreadsheet Code:

So, with the above, I can create a new contact from a form entry, and provided that the Status Column is "Needs Update", I can delete a contact and re-add the contact with new details (unless the email address is the value changed, which is a glaring flaw I know - bonus points if you can fix this too).

The Big summary where what I really need is revealed:

Everything works fine for when they submit a new entry. But if they then hit the edit button and update their details in the form, I need a way to update the Status to "Needs Update", as that is what my "updateContact" function is looking for.

Would love thoughts or guidance, I have sunk hours into this and would really love to get it working. I feel it is "really close", I just need this one little variable for my function trigger to "get it over the line" and am hoping you can make that happen!

Show more