Google Calendar - calendar visibility and groupings - google-apps-script

When using Google Calendar in Chrome, there is a 'Display this only' option that will hide all my calendars apart from the selected calendar. I have a list of about 20 calendars so this feature is very useful.
The problem is that to re-enable the visibility of the other 19 calendars, I have to click on each calendar's checkbox (in the left sidebar), one at a time. This is not at all practical when needed a less complicated view for dealing with many events in each of the calendars.
Ideally, what I would like is to have the ability to turn on the visibility of all calendars with one click, but also to group calendars so that I can show and hide groups of calendars with one click. This would work really well with Room and Resource calendars.
I understand that users have been requesting that Calendar natively support these types of features for over 10 years now. From the lack of response on this issue from Google, it seems they don't think this is worth adding, which surprises me considering half of the feature is there with the 'Display this only' option.
So, does anyone know of a way to create visibility groups (or all calendars shown/hidden with a click) programmatically? Maybe with Google App Script? I would appreciate anything that could point me in the right direction.

Related

Moving an item from one Google form to a new Google form using google apps script

When editing a Google form manually, you can usually click on an item, and on the side appears a menu, which includes the button "import questions". This button is very useful for me as it allows me to collect questions from past Google forms and import them to new Google forms.
But I'm looking through the Forms documentation, and I can't figure out how to do this via Google apps script programatically.
Here is the documentation:
https://developers.google.com/apps-script/reference/forms/form
The closest thing to what I want is the .moveItem() method, which moves an item from one spot in a form to another. But it only works within the same form. I want to know if I could do it across forms. And ideally, instead of moving the item, it would make a copy of the item in the new form.
I considered the .getItems() method, but there doesn't seem to be a general .addItem() method I could use on the new form. Would I have to go through the painstaking process of having to identify each item type, and specify how the details of each one should be copied to the new form, including things like point values of a question and whether or not the question is required?
I want to import from forms that have all kinds of content: video, images, multiple choice questions, grid questions, number scale questions, etc. I feel that if I have to specify the details of each item type, it would take too long, and I would be bound to miss something or run into an error that may be impossible to solve. Is there not an easier way?
And if specifying each item type is what I have to do to import everything properly, has someone else created that code already that I can re-use?
Issue:
In the current stage, unfortunately, it seems that Forms Service cannot copy all items. Ref1, Ref2 Ref3. And, unfortunately, moveItem can be used for the same Google Form as you say.
Workaround:
In your situation, as a workaround, how about copying the source Google Form? And, when there are some items you want to remove, you can remove them. I thought that this process can be achieved by Google Apps Script.
But, I'm not sure about your actual Google Form. So I'm not sure whether this is a suitable method.
Future:
Recently, Google Forms API was announced. Ref When this API got to be able to be used, your goal might be able to be achieved by retrieving the object from Google Form. Unfortunately, I'm still not sure about the detail of it.

Need Solution for Full Calendar with list of events and link to specific event page

I'm building my final project for my studies and I'm trying to make an event calendar that shows events in the calendar itself. I found a few solutions so I'm good with that part, I think.
Although, what I want to add is an option so that under my calendar there will be a list of all events for this month (it's a monthly calendar) and the list will match what's showing on the calendar itself.
When someone presses one of the events on the list it will take them to a specific page for the event, and there will be an option to have an open discussion about the event.
Is that possible?
Is it to complex for a beginner to do?
What are my options?

How to add event in google calendars to user who fill the google form

I want that if some people fill the google form, the new event fall in his google calendar. How it is possible to do?
Here is a web site I used to do the exact thing.
http://www.jessespevack.com/blog/2016/2/9/turn-a-google-form-response-into-a-calendar-event
Follow the steps and its not to bad.

HTML Tags in Google Calendar Event Descriptions

I work for shared calendar service. Idea is to have all personal calendars from different vendors in same page.
I`ve got situation if I receive event invitation from Office365 in my Google calendar - all html tags (from description field) are added to my Google calendar like plain text. If I clean ones in Google calendar I have a risk if event will be changed in Google calendar - modified description (cleaned from tags) will be shared to another calendar vendors.
As result user expects similar description in different calendars but not html tags. To make it easy I can leave it as it is. To make it good working I've considered different algorithms. All of them need additional rules, some duplicated fields and extra validations.
Years before HTML Tags in Google Calendar Event Description was pushed to Google, but it is not resolved as I see...
Is there any good solution with easy effort, workarounds or which implementation way I should follow?

How can a calendar refresh/reload after a event was changed?

I'm changing a event using the CalendarApp script, but it seems it appears on the Calendar UI only after a random time, ranging from seconds to minutes. Is there a way to force the event to be updated/refresh on the Calendar immediately after it was changed on the script?
I tried using several combinations of
cal.setHidden(true);
cal.setHidden(false);
cal.setSelected(false);
cal.setSelected(true);
CalendarApp.setHidden(true);
CalendarApp.setHidden(false);
CalendarApp.setSelected(false);
CalendarApp.setSelected(true);
but I still have inconcistent results. Any idea?
Thanks in advance.
The calendar service and the calendar Browser Ui are two separate things, they have no relationship except being linked to the same source (the calendar itself), there is no way for a script to interact with the calendar Ui... You can use the refresh button under "more" menu in the upper right corner of Calendar Ui but that is all you can do.