I use microsoft graphapi to supervise room booking.
I use /users/${roomEmail}/calendarView/delta to get all updates between two calls.
The problem that I have no information when an item of a serie is updated.
For example :
I call a first time calendarView with a time window 2022-01-01 to 2022-12-31
A add a meeting serie with 3 occurrences
I call calendarView : I have an update with the serieMaster
I change duration, start or end of the 2nd occurence of my serie
I call calendarView : update list is empty
How can I do to manage series content updates ?
Related
I have a chart which was created from a data range (lets say A:C) on Google Sheets.
If I add a new column (so we now have A:D), I am not able to see the new column represented in data points I can add on under Chart Editor -> Setup -> Series.
Does the chart need to be refreshed or something in order to see new Columns? I tried looking here but it didn't seem to help: How to Force New Google Spreadsheets to refresh and recalculate?
To achieve this, you can use Google Apps Script. Using a trigger that fires when the document is edited onEdit() and reflecting the new content within the chart using the class EmbeddedChart.
Example
Assuming the table looks something like this (the example should work with another format):
Name
Measure 1
Measure 2
Marshall
1
2
Barney
2
3
Ted
3
4
It will generate a chart like this:
First you need to open add a new script via Tools>Script Editor
Inside the Code.gs file, add the following:
Code.gs
const onEdit = (event) => {
// Get the active SpreadSheet
let ss = SpreadsheetApp.getActiveSheet()
// If you want to limitate the range within
// you should use the range within the Event Objects
Logger.log(event.range)
let chart = ss.getCharts()[0]
// Get to A1 to the last available cell
let newRanges = ss.getRange(1, 1, ss.getLastRow(), ss.getLastColumn())
chart = chart.modify()
// Clear the old ones
.clearRanges()
// Add the updated values
.addRange(newRanges)
.build()
ss.updateChart(chart)
}
The above script triggers every time you edit the sheet where it is included. Get the updated data from the spreadsheet, and include it in the chart. Right now the script detects any change in the spreadsheet and adds from the first cell to the last to the chart.
Note: onEdit is too broad, you can control it using different methods, for example:
if(e.range.getRow()>20) return
For example, adding this new data:
Name
Measure 1
Measure 2
Measure 3
Marshall
1
2
3
Barney
2
2
4
Ted
3
4
5
Lily
5
6
5
It will automatically generate this chart:
If you think this should be included in Sheets, you can also send feedback to Google using Help>Help Sheets Improve or via link.
Documentation
Google Sheets Event
Google Apps Script
Spreadsheet Service
Class Range
I have a question for my current Spreadsheet A.
Now I'm trying to make a new sheet for report generation where:
Report shows each ticket recorded on spreadsheet A.
Each ticket have 3 recorded process time. (Verification, Repair, QA)
The month for when the job ticket is first registered.
For illustration purpose, new sheet should look like this:
Ticket ID
Verification
Repair
QA
Month
T-001
X Hour
Y Hour
Z Hour
9
T-002
X Hour
Blank if no recorded time
Blank if no recorded time
9
...
...
...
...
...
Can Google Sheets do that? If can, how do I do it?
I have tried looking for some tutorial videos on Vlookup/Hlookup/Query/Search/Find, but I cant seem to get the results I needed.
EDITED: Changed question 3 from Name to Month
My solution is not the most elegant but it works:
https://docs.google.com/spreadsheets/d/1dEMYbI751pp55YF5M0V19U0QbytsabgwAO_97I1LXqw/copy
First get all ticket names using UNIQUE formula
=unique(C3:C)
When you got it, you have to find rows using 2 conditions:
Process & Ticket. In order to get it using VLOOKUP I make temporary array that contains Process and Ticket columns stitched together and duration column.
Then I use VLOOKUP using 2 stitched keys
=ifna(
arrayformula(
vlookup(G2&$F$3:$F,ArrayFormula({$B$3:$B&$C$3:$C,$D$3:$D}),2,false)))
Ifna prevents from error messages displayed when no value is found.
First arrayformula lets work this formula for an entire column.
Last task is to determine name of an employee. I use vlookup, but as name is futher left then Ticket, I have to make a temporary array {C3:C,A3:A} to search for name.
Warning: Vlookup is listing only first name found on the list.
I want to apply filter from DATA -> Create Filter in Google Sheet and when I have e.g. 10 items in specific table I want to have only 10 rows (delete other empty rows) and when I apply that filter for specific column It creates me a fully working filtering and sorting column. After that when I add some new item dynamically using Glide App for making App from google sheet project It adds me new row (number 11) but without filter and sort range.
View after creating filter:
After add new item from Glide app:
That newly incoming item doesn't inherit that sorting and filtering view. Is there any way to force that inheritance? I cannot set via google sheet range B3:B by using filter I can only mark range and I have set whole column B when I was creating that filter.
It is possible to achieve this behaviour?
Issue and workaround:
Since the data is getting appended programmatically by a third-party, there is no way to automatically update the filter to include the new data.
As a workaround, you can install an Apps Script time-driven trigger in order to update the filter periodically (taking into account the different time-driven triggers, the highest possible frequency is one minute), according to current data.
Of course, it would be more appropriate to trigger the update immediately after data is added, but unfortunately, triggers like onEdit only work for changes made by users.
Function to update filter:
First, create a function that will update the filter. Select Tools > Script editor to open a script bound to your spreadsheet, copy the following function and save the project:
function updateFilter() {
var sheetName = "Sheet1"; // Sheet name (change if necessary)
var filterColumn = 2; // Column index (change if necessary)
var sheet = SpreadsheetApp.getActive().getSheetByName(sheetName);
var filter = sheet.getFilter();
if (filter) filter.remove(); // Remove previous filter if it exists
sheet.getRange(1, filterColumn, sheet.getLastRow()).createFilter();
}
This function removes the current filter (if it exists), and creates a new one at column B of a sheet named Sheet1 (please change these according to your preferences).
Install time-driven trigger:
Then, you would need to install the time-trigger so that the previous function executes every minute. This can be installed manually, by following these steps, or programmatically, by running this function once:
function createTrigger() {
ScriptApp.newTrigger("updateFilter")
.timeBased()
.everyMinutes(1)
.create();
}
Reference:
Installable Triggers
Class ClockTriggerBuilder
I'm trying to put together management information for a call center.
I've got the following info on every call that gets logged:
[CreatedOn] = Date & time of creation
[Case_status_name] = Reason for closing the call (Answered by 1st line, transferred to 2nd, call back request etc.)
Now what I'm looking to make is a graph which will show in one line the % of calls that were answered by the 1st line and the annual average% of calls closed by the first line during the last 12 months.
I can get the months from [CreatedOn] with the extract function, the same goes for the year.
I can group the [Case_status_name] in 1st line answered and everything else with a simple if statement.
But I'm having trouble getting the percentages right for both the month and the year together.
I can get sensible data if I only calculate the yearly average or if I calcluate the monthly average. But when I try to do them together, I wind up getting all kinds of crazy values.
What is a proper way to get the monthly and annual percentage in the same table?
Create Query
Add Column [Month] with expression
_first_of_month([CreatedOn])
Add Query Item [Total] with expression
1
Add Query Item [Answered by 1st line] with expression
case when [Case_status_name] = 'Answered by 1st line' then 1 else 0 end
Add Query Item [closed by the first line] with expression
case when [Case_status_name] = 'closed by the first line' then 1 else 0 end
Filter this Query
[CreatedOn] between _first_of_month(_add_months(current_date;-12))
and _last_of_month(_add_months(current_date;-1))
Add Query Item [% of calls answered by the 1st line] with expression
[Answered by 1st line] / [Total]
Add Query Item [12-month average] with expression
sum([closed by the first line] for report) / sum([Total] for report)
Build Graph based on this Query
I have clients who register for 2 or more classes via a form and the dates appear in separate columns on the form summary page - name in colB, first class date in colD, second class date in colG, etc.
So clients dates of their 1st, 2nd, 3rd classes overlap.
I want to pull the dates into a schedule sheet and can do this easily for the first date (colD). But I cannot figure out how to also pull in the clients for the second class into the same column on the schedule sheet. I can get them into separate columns easily enough, but would like them all to appear in the same column to save space and make the scheduler more easy to view.
This is the code I tried:
=QUERY(Form3!B1:M200, "select B, D where C >= date '2015-03-02' and C <= date '2015-03-06'", 1)
Is it possible to create a single column list of all clients taking class any particular week regardless of whether it is their 1st 2nd 3rd class?
It means drawing from 3 or more columns and returning all the results to just one column.
Please try:
=arrayformula({Query(Form3!A1:D20,"Select B where C>=date '2015-03-02' AND C<=date '2015-03-05' ",0);Query(Form3!A1:D20,"Select D where C>=date '2015-03-02' AND C<=date '2015-03-05'",0)})