How To Set A New Default Tab As A Specific Spreadsheet on Google Sheets (Not As A Blank Page)? - google-sheets

How do I set a new default tab to be a specific spreadsheet that I made with formulas, etc.., so that every time I click a new tab, it opens up this specific spreadsheet, instead of a blank Google sheet page?
Is there a VBA code?

grab the sheet tab and move it to the front:
_______________________________________________________________
if this is a question about setting up a template as the default page for every newly created spreadsheet - that's not possible. templates are available for individual selection under this button:
_______________________________________________________________
to actually "clone" the sheet you will need to use a script. you can try something like:
function cloneGoogleSheet() {
var name = "labnol";
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('Template').copyTo(ss);
/* Before cloning the sheet, delete any previous copy */
var old = ss.getSheetByName(name);
if (old) ss.deleteSheet(old); // or old.setName(new Name);
SpreadsheetApp.flush(); // Utilities.sleep(2000);
sheet.setName(company);
/* Make the new sheet active */
ss.setActiveSheet(sheet);
}

From my ad hoc trying, Google Sheet seems to determine the default Tab by the creation time. My simple solution is to copy/delete any Tab that is older than the desired new default.
For example, we have a Tab "New Default" that we want to set to the new default. Assume there are only a small number of Tabs (3 Tabs) created before the "New Default" Tab, and all other Tabs were created after the "New Default" tab.
(1) Create three new empty tabs.
(2) Copy over the three tabs created before the "new default" Tab,
so that we do not lose them. Then delete these three tabs.
Now the "New Default" becomes the default tab when open the link to the spreadsheet.
Note:
Of course, this approach has limitations and may need a script to do the copy/delete. Or even better if Google Sheet team adds support to set default though GUI directly.
Alternatives:
Before I came up with this low-tech solution, I also tried using a Google App Script .setActiveSheet("New Default") method on start. It works for the jumping; however, when people comment in the "New Default" tab, I got a notification in email. When clicking the comment, it jumps to the top of the default tab, which is annoying since it loses focus to the comments text.

Related

Is there any custom option to lock work item for specific iteration?

I'm trying to lock/deny the option to open a new work item with specific iterations.
I tried to do it with a custom field with same value of iteration id and
<PROHIBITEDVALUES> rule.
Then I understood that its not possible because iteration-id field load only after I press the "save" button and its too late.
There any other ideas how to do it?
There is not any build-in option to hide older/specific iterations in the Work Item field.
However, you can set the security for "Edit work items in this node" to deny and they will not be able to save work items with the area or iteration selected.
Besides you could also hide the iteration node(s):
Open Project settings>Project configuration
Select the Iteration Tab
Select the iteration that you want to hide
Click on Security > Add a "Deny View" permissions for the users that
you want to hide the nodes from.
The user will not able to see the iteration in the sprint.
update:

Chart of Item Types in VSTS

I'm trying to convert a small team to the benefits of using TFS with Visual Studio Online. I've created a custom process and custom work item type. I've also adde a few 'custom' states for items (eg: 'In Test').
Is it possible to create a query/chart similar to below, with a count of each item type - as below?
Create a new query to retrieve necessary work items
Go to your team project Home page (e.g. Home=>Overview)
Click Edit Dashboard=>Add Widget
Select Char for Work Items=>Add
Click Configure to configure this widget
Select corresponding Query
Select Chart type (e.g. Column)
Select State in Group by list
Click Save
Yes, VSTS supports dashboards that you can easily add widgets to. You can add dashboards on the Home tab by clicking + New in the upper right, and edit with the checkmark in the lower right. Have a look at the Chart for Work Items widget. Given a query of work items, it supports various chart visualization that you can configure and show.

How can getLoadTime plugin be implemented in Adobe DTM?

Where do I make the initial function call to s_getLoadTime(). My library is being managed by Adobe.
https://marketing.adobe.com/resources/help/en_US/sc/implement/getLoadTime.html
Step 1: Add the plugin and timer start code
First, you need a Page Load Rule that is set to trigger at "Top of Page". If you already have an existing rule that triggers every page load at top of page, you can use that. If you do not, then create a new one.
Then, in the Javascript / Third Party Tags section, click on "Add New Script". Set the Type to "Sequential Javascript" and check the Execute Globally option.
In the code box, paste the following code:
// this is for older browser support
var inHeadTS=(new Date()).getTime();
// plugin
function s_getLoadTime(){if(!window.s_loadT){var b=new Date().getTime(),o=window.performance?performance.timing:0,a=o?o.requestStart:window.inHeadTS||0;s_loadT=a?Math.round((b-a)/100):''}return s_loadT}
// call plugin first time
s_getLoadTime();
Click on Save Code and then Save Rule.
Step 2: Make the 2nd call to plugin and assign to Adobe Analytics variables
Next, you need a Page Load Rule that is set to trigger at "Bottom of Page". If you already have an existing rule that triggers every page load at bottom of page, you can use that. If you do not, then create a new one.
Then, go to Conditions > Rule Conditions > Criteria and from the dropdown select Data > Custom and click "Add Criteria". In the code box, add the following:
_satellite.setVar('loadTime',s_getLoadTime());
return true;
Then within Adobe Analytics section of the rule, you can set your prop and/or eVar to %loadTime%.
Note: Using a rule set to trigger at "Onload" will technically be more accurate. However, DTM does not currently offer ability to trigger Adobe Analytics Onload (options are only for top or bottom of page), so if you set the rule to "Onload" it will trigger after AA has made a request so your variables will not be populated and sent in that request. If you really want to keep the accuracy then you will need to explore other options, such as implementing AA as a 3rd party script so that you have more control over when it triggers.
Click on Save Rule and then Approve/Publish once you have tested.
The question should really be, "Why should the getLoadTime() plugIn be used, ever?". Yasho, I started with the same question that you had and blindly implemented the plugIn in Adobe DTM following the instructions at https://marketing.adobe.com/resources/help/en_US/sc/implement/getLoadTime.html
Only after starting to analyze the data did I look into the plugIn to see what it does.
Below is the beautified code of the plugIn:
function s_getLoadTime() {
if (!window.s_loadT) {
var b = new Date().getTime(),
o = window.performance ? performance.timing : 0,
a = o ? o.requestStart : window.inHeadTS || 0;
s_loadT = a ? Math.round((b - a) / 100) : ''
}
return s_loadT
}
So, basically the function records s_loadT once and only once. The first call (way at the top of the page) sets the value and any subsequent call to the function will return that same value since it has been persisted in window.s_loadT
Scratch your head a bit and ask the obvious question, "So what does this measure anyway?" Best case, it measures the difference between window.performace.timing.requestStart and the timeStamp when the function was first called. Worst case it measures the difference between a timestamp set in the head of the document by javascript (and that difference could very well be a negative number). Or even worse if 'a' resolves to 0, you'll just get 'b' which will be a huge number.
If you are following the directions and calling getLoadTime() up high in the document (DTM page top rule), you're really just be measuring how long it takes to fire a page top rule. If you put the first call into the top of your s_code.js, you're just measuring how long it takes to load (and execute) s_code.js

Devexpress : Express Printing System - Print contents of 2 cxgrid's

Actually, I never tried this but it's supposed to work judging from some comments I've read. I have two grids: One displays Hotel guests and the other one their former stays (Date from- date to, etc..). Now I would like to be able to print both contents as a single report.How do I add the linked contents of the second grid to my dxComponentPrinter1Link1 ??
In the IDE open your form.
Right click and choose ReportLinks on the TdxComponentPrinter
object.
In the links editor window, instead of clicking the Add button, click the dropdown arrow next to the Add button. Choose Add Composition.
This creates a TdxCompositionReportLink object. There is an Items property which will hold all of the report links you want in the composite report. This will print out as a single report. I can't promise both reports will be on the same page though. I've never figured out how to do that.

How to add edit items to the predefined lists in TFS Work Items

I am trying to follow this article to do the same for adding a new State to a particular project's Bug work item. By default I can only see . I wanted to add a new state, "On Hold"
But I perhaps followed it wrong and ended up getting
The error says "Open Transition Active~On Hold to add at least one Reason." How do I open that transition and where do I add one reason. What is the reason it is talking about? I only want to add a new state.
Thanks for your time...
Double click the Active~On Hold Transition , select the Reasons tab and type in at least one reason.
After saving the .wit file, you must click Refresh from the Team Explorer menu in order to see changes.
In the work item editor, double click on the Transition between your Active and On hold states. Under 'Transition Detail' you should see 'From: Active' and 'To: On Hold'. Change 'From: Active' to blank so it should show 'From: '. Now save the editors, click 'refresh' from the Team Explorer menu and any new bugs you create will have 'On Hold' as an option for the state.

Resources