SharePoint Change Page Title without changing site address ページタイトルをサイトアドレスを変えずに変更する。

これってSharePointのこの部分がちゃんと動いていないだけなのではないかとおもうのだが、今現在のOffice365(SharePoint Online)のインプリメンテーションだと、Page Attributeでページタイトルを変更するとaspx ページの名前自体が変わってしまう。


というページがあるとして、これだと表示されるページタイトルが”thispage”となってしまう。これを Edit pageからタイトル変更して ”This Page”とすると、 サイトアドレスが



世の中には同じことを不便と考える人がいるわけで、何件かの記事ではSharePoint Designerを使ってマスターページを変更する方法が述べられている。すでにSharePointにある機能をターンオンするだけの簡単な修正ではあるが、

2)SharePoint Designerが必要

すなわち、サイトオーナーでかつSharePoint Designerを使えるという条件を満足していなければならない。

ブラウザーのdebug Toolで確認してみたら以外と簡単にタイトルだけ変更できることが判ったのでここに書いておく。 サイトのエディター権限があればできるというのが利点。

ターゲットのページでエディットモードに移行し、適当なところに Insert ->Embed Codeでコードエディターを開く。


document.getElementById('DeltaPlaceHolderPageTitleInTitleArea').innerHTML="My Page";

これだけである。 ページタイトルが”My Page”となる。

SharePointの場合、CSRというメカニズムがあって、表示する内容の大部分は一度ブラウザーがスクリプトを実行したのち、データを描画するため、 ページへの書き込みのタイミングを遅らせなければならないのが普通だが、タイトル部分は最初の読み込み時に描かれてから変更がないため、上のようにブラウザがスクリプトを読み込んで即実行、という単純な動作でも有効なんである。

ちなみにWiki PageとWeb Part Pageの両方で有効。 Site Pageはためしていない。



constructing long string with Javascript

There is a time you need to construct a string (for instance, to create a html block) in your code.

In the simpliest approach, youcan constract the string variable  like so

var html='<head><body>’+contentVariable+’more stuff’ + ‘</body></head>’;

this becomes very messy quickly once more variables, more nested construction is needed.

I used to keep concatinating the string, like so

var html='<head></body>’;

html +=  contentVariable;

html += ‘ more Stuff’;

html += ‘</body></head>’;



Then I saw a pattern in the couple of codes from internet;

var h=[‘<head><body’];


h.push(‘more Stuff’);


var html=h.join(”);

The More concatenation needed, the more convinient the last method becomes. Key is to join the array element with null delimiter.

exploring SharePoint Online

Our office is soon moving to SharePoint online. Currently we are using SP2007 and Microsoft does not support content migration from 2007 to 2013 or SP online. This is good and bad. Good because we can build sites from scratch, bad because there is no easy way to move our contents from SP2007 to SP online. We should be able to copy files and folders from 2007 to online but all the metadata will be lost. lists will be even tougher. we have the third party solution called ShareGate but IT guys are telling us it is faily slow we can not possibly migrate the whole sites (that is in the size of the order of Terabytes.) and would like to selectively use the tool. Document Management is tricky under the SharePoint at best.

UI has been greatly improved. It is now much easier to interact with contents with JavaScript. I am having tremendous fun with technique like CSR (client side rendering) and REST API that can be used with CSR or as a conetnt of CEWP as usual.  Furthermore , attaching JavaScript code to web part is made less painful by the introduction of JsLink option and inclusion of script web part.

It is also good to have started late in the game. Internet is filled with power user tips. (I can use most of the technique meant for SharePoint 2013 with SharePoint online.)

One of my favorite technique called “calculated column” is still possible with much less hassle.  Again CSR can be used for this with literally one line of code.  Even better, I can forego with calculated columns at all and directly manipulate the target columns and show bar graph or traffic signal instead, using CSR’s context override.

Filter/connection of WebParts on the page is now performed on the list and not view. In another word, the filtering column do not need to be a part of the view.  This is tremendous for me. I no longer need to hide a column that is used for my filter because I don’t need to include the column in the view to start with.

EasyTabs that we used and found so useful for SharePoint 2007 does not work as is.  Again somebody has modified it for SharePoint 2013 and it is  working. Christophe seems to have developed another tool package that includes EasyTabs functionality but my inquiry to him went unanswered so I am using this version.

There is another code called Hillibily Tabs which essentially do the same thing as EasyTabs.  This one uses jQuery and jQuery UI (and CSS) to manipulate the tab, so how do I say this..  It’s flashy and probably more maintainable.

Excellent write up on CSR by Andrei Markeev is here be sure to check other articles by him.

This one by Kaptyn is also good

Many CSR examples are on Office Dev Center, uploaded by Muawiyah Shannak.

The above examples contains calculated column like effect witihout using the calculated column.    However, if you insist Calculated columns to be used, here is Christoph’s explanation of how it can be done.

List Roll up

I was first thinking maybe we need to purchase third party package to do this.  It turned out this is doable with home made JavaScript code with REST API. I am able to Roll up the list (read only at this time, because I only feel comfortable with “GET” potion of the API) in my sandbox, using a couple of sub-sites.  I will try and see how scalable this technique is.

Minimum Download Strategy

Sooner or later, people will hit this “MDS” *issues*  where the view changes back to its default look when switching the view,  or code breaks because it can not find jQuery that was supposed to have been loaded.  I am still learning this but found some blog entries very helpful.

  1. Article by talks about what happens with MDS in very short text and also give pointers to how to deal with it
  2. SharePoint 2013 – A Better Pattern for Client Side Rendering Scripts shows a script pattern that can be used for site with or without MDS feature enabled.

However, my observation is that once you introduce your own code to the mix, then SharePoint engine with MDS seems to try render first with MDS way, then try to render again for “foreign” code.  Because of this, some of the pages does load faster with MDS off.  So turning this feature is not as bad as it may sound.


Most of the link here are from various blog entries.  Again, it must be much easier now than two years ago to find the information I need.  MSDN also have many documents I can refer to but there coverage is broader (C#, XML ,.aspx and JavaScript code).  As a business side power user, I (can) only use JavaScript and find those individuals’ entries priceless. My appreciation goes to those who spent many nights to figure out and then took a time to write about it!

SharePoint online :: modifying “New item or Edit this list” to “Edit this list”

This is my first “SharePoint Online” related javaScript.(I am still experimenting with nuance of SP online)
This script changes “New item or Edit this list” links to simpler “Edit this list link.

* Created by A2life on 3/24/2016.
* Modify new or edit div to "edit this list" only
* modify "New items or edit" elements on entire page (not just webPart this is attached to)
* */
(function () {

var thisContext = {};
thisContext.OnPostRender = modifynewEdit;


function modifynewEdit() {
// jQuery library is required in this sample
// Fallback to loading jQuery from a CDN path if the local is unavailable
(window.jQuery || document.write('<script src="//"><\/script>'));

jQuery("'new')").each(function (index) { //only respond to "New" elements
var edit = $(this).find('a:contains("dit")'); // because I am looking for "[E|e]dit"
edit = edit.text("Edit").add("<span> this list</span>"); // reconstruct link with proper words

attach this to list webPart as jsLink parameter. If uploaded to Site Assets folder as “modifyEdit.js” , it should look like “~site/SiteAssets/modifyEdit.js” . “~site” is a token for the site that sharePoint uses to resolve the url reference.

Note on this code.

  • The document.write line dynamically writes a script tag for jQuery. This appears to be more reliable way of loading jQuery rather than referencing to the file within script tag.
  • The code creates a context override for onPostRender SP event for the webPart (of item list view) being attached. This event seems to fire even when other list view on the same view is changed  (and the code invoked will affect other list views on the same page as expected) so the function modifynewEdit is attached to this event.

Windows 10にアップデートしたら一部アプリケーション(サンダーバード)のフォントがにじむ・ぼやける・溶ける という話

Windows 10へのアップデートはつつがなく終了。 驚いたのはVistaが搭載されていた古ーいノートブックパソコンでも難なくアップデートできてしまったということ。 2年前に組んだデスクトップは全く問題なくアップグレード終了、
と思ったら、 メールクライエントとして長く使わしてもらっているサンダーバードの画面が変だ。 テキストがにじんでいる。

そこでBlur TextとかImage fuzzyとかでグーグル検索をしてみたら、でてくるはでてくるは。  でもたいていの記事はWindows画面のスケーリングを100パーセントにもどせ、だとか,サンダーバードのこんふぃぐにCSSファイルを追加しろだとか、 ようするに画面の解像度と表示フォントのからみの問題としてとらえている。

これかな?と思ったのはThunderbirdのオプション設定においてgfx.direct2d.disabledというパラメーターをTrueに設定する、というもの。 詳細手順はここに詳しい。


自分が直面した問題は 最初はきれいな表示になっていても、数秒そのままにしておくと、文字フォントがどんどんにじんでいってしまう、というもの。 目の前で文字が溶けていく、というか なんだか余計な処理がはじまっているかんじなのだ。


この記事はAMDのグラフィックスカードの3D機能のモフォロジカルアンチアライアス(MLAA)なる機能が悪さをしているので、これをオフにしようね、というもの。 で、自分のマシンのスペックをみてみれば、 Intelの6400というグラフィックスチップなのだった。 が、 解決法は同じで、3D処理の部分のコンサーバティブモーフォロジカルアンチアライアスの(CMLAA)設定をオフにしてみたら解決。 何かコンサーバティブ(保守的)なものか さっぱりわからぬ。
1.Windows 10の画面を右クリックし、”グラフィックス・プロパティ”を選択
2.3D設定を選び、 CMLAAの設定をオフにする。


どうもWindows 10にアップグレードしたときに、インストーラが気をきかして? 最新のグラフィックスドライバーを導入したみたいだ。 サンダーバードほどではないにせよ、 エッジブラウザにも影響がでているような感じだった。

Blurry, fuzzy or melting text on Thunderbird after upgrading to Windows 10

When I upgraded to Windows 10, I noticed text on thunderbird was blurry or fuzzy. I googled up the web and had a lot of hit on this subject. There are variety of fixes suggested like…
1) disable hardware acceralation
2) Go to TB option page and change the gfx.direct2d.disabled to true
3) Set Windows display scaling to 100%
etc., etc.

While I believe those suggesions are all true, none of them solved my issue.
Further observation into TB’s screen showed the text start out showing clear then after few seconds, it becomes fuzzy. It feels like the text are melting in front of my eyes.

Then I found this article

The article was for AMD graphics driver. My graphic chip is Intel HD graphics 4600, but looking at the Intell HD graphics control panel, I have found the 3D setting where Conservative Morphological Anti-Aliasing is set to on. Setting this option to off immediately resolved the issue.

It appears, when my PC was upgraded to Windows 10, the device driver was also updated and it introduced this CMAA setting. This may be a good technology for gaming, but not for Document application.

日経電子版 Evernoteとの連携サービスを開始

ビジネスマンのたしなみとして日経電子版を購読しているのだが、 今朝メールボックスをみたら、 以下のようなお知らせが来ていた。


これは便利そうだ。今までもWEB clipper で記事を切り抜いてはいたが、これからはもっとインテリジェントな切り抜きができそうだ。

 ちなみに自分が初めてEverNoteに触ったのは2007年、まだPalm機をPDAとして使っていた時期だった。 AceCADのDigiMemoを購入したらバンドルされてきたPC用のソフトだった。 これはLotus 123なみのキラーアプリだ、と思った記憶がある。 当時は日本語が通らなかったが、問い合わせたら、いつのまにかCJK版のベータテスターになっていたりしているうちに 2008年にはWEBサービスを開始。クラウドにローカルデータのコピーが保存され同期するというデータモデルは当時としては画期的だった。
自分のユーザーアカウント番号は6万9千番台、 今はどれくらいのユーザー数がいるのかわからない(2011年時点で1000万人超え, 2013年末には8000万以上)のだが 今にして思えばEarly Adopterだったわけだ。

Nexus7 OS 更新でメモリー容量が半分になってしまった、という話

Android oS 5.0.2 にUpgradeしたのは良いが、メモリー容量が半分になってしまったという話。

2012年に発売され既に製造終了のNexus 7であるが、Googleから販売されただけに最新OS Lollipop(5.0.2)がPushされてきた。 勿論喜んでアップデートしたわけだが、再起動後、データを復旧した後の動きがきわめて遅い。 そのうち「メモリ-容量が足りなので一部機能が使えません。 不要なデータやアプリを削除してください。」などというお知らせが出てしまった。



たしか自分が購入したのは16ギガバイトモデルだったはず。 10ギガバイトもOSのファームウエアにに使われているわけ?





自分の持っているHP-12Cは電池がCR2032を2枚使うもので、要はオリジナルではなく、21世紀に入ってから作られたAtmelのマイコンを使ってオリジナルのファームウエアをエミュレートしたものだ。 当然実行速度は速くなっており、形状的にも手軽なのでちょっとしたビジネス計算用にオフィスの机の上に置いてあったのだが、使いだしてから半年もたたないうちにLCDのセグメント欠けが発生するようになった。セグメントが1本、2本とかけていくもので8を表示しようとすると日の代わりにトのような表示になってしまう。 最初は電池を変えるともとに戻ったりしていたのだが、そのうち欠けるセグメントがどんどん増えてきて計算機として用をなさなくなってしまった。



ゴム足の下のネジ4本と電池室のネジ2本を外すと、上蓋と下蓋に分解できる。 この状態で観てみると、表示用のLCDのFPCの端面が部品実装した配線板に直接張り付けられている。 経験上からHeat Sealという製法で接着されているとわかったので、この状態で電池を入れ、試しにFPCのこの部分をピンセットの先で配線板に押し付けてみると、一部の表示が復活する。押す場所によって復活するセグメントの位置も変わる。

工程上では加熱圧着することによって接続をとることになっているが、接続部分がはがれかかっているらしい。 そこで 小型のHeat Gunを使ってこの部分を温めながら、マイナスドライバーの先で、FPCの接続部分をまんべんなく押してみた。


組み立てなおしてHP12Cしっかり復活してしまった。 2か月ほど経過したが問題なし。

近頃のHPの電卓は品質管理が良くないね。’s dumpster dive

Sparkfun’s dumpster dive is once in a few months event when they prep a limited amount of red boxes filled with rejects and some left over that they don’t feel as retail quality merchandize for various reasons, and put them on sale.

I bought these boxes on two occasions so far and I am reasonably pleased.
Let me share my experience.

  • Sale.
  • The sale takes place on select Fridays. In both occasions I learned about the sale when I visited the site to check out their blog section for new products, which they announce on every Friday morning.
  • The sale event will occur at 12 noon MT.
  • The whole lot will only last a couple of minutes, then the sale will be over.
  • Prior to Noon, you go to the site, login and go to the product page(DD-12012). There is no purchase button displayed yet. Precisely at 12 Noon, you start hitting the F5 key to refresh the screen. Once you see the Buy button, click on it to secure your purchase. If you can go through the purchase process in less than 2 minutes (confirming your address, shipping method and payment information and so so on – the fact you are already logged in will help expedite the process), chances are you will be rewarded with the order confirmation page.
  • Wait with a great anticipation for 3~4 days for the box to arrive.
  • Open the box and find out what is in there.
  • First purchase. (Feb 2014) – All parts listed were confirmed functional.
    • Pcduino v1 x1
    • PIC KIT2 compatible CANAKIT programmer x1
    • Vehicle diagnostic kit x1
    • Sonar module x2
    • FTDI USB-Serial converter (3.3V) x1
    • Stepper motor driver board array. I was able to separate 5 good boards while destroying 1 using dremel
    • A lot of electrolic capacitors
    • One comparator, One photo interrupter, One gap sensor, One ADC.
    • Half dozen of banana plugs
    • USB bluetooth dongles.
    • 3 pin rotary encoder x1
  • Second purchase
    • LCD module 24 chars x 2 lines
      It had 14pin connector. Using Arduino example sketch and pin out information I gathered from Internet, The module was confirmed functional. There is a two terminal pad on PCB which is obviously for backlighting and it looks like EL lighting. $10 value.
    • LCD module 16 chars x 2 lines
      There was a 14 pin ribbon cable coming out from the module. Again I used the pinout and Arduino Uno to confirm the functionality but this one did not work at the first time. It turned out the ribbon cable was broken, so I removed it and replaced with a header connector. The part is now working. $7 value.
    • Bleep drum version 1
      1) This assembly was in a bad shape. I suppose the kit was used in a class room environment or something, but who ever built the kit got the switch and stereo plug on the wrong side of the PCB and must have abondned the project. 9V battery holder and one of four studs were missing as well. Desoldering those multiple lead components was not a fun at all.
      2) I attached 9V battery and powered it up, hoping the LED will light up. Nothing happened and 78I05 was getting rather hot. Quick check on the output of the voltage regulator indicated something was loading down the VR really bad. Pop out the 8 pin dip and LED started to respond to button pushes. VR out was 5V. Oh, bad IC chip I thought and looked a t the part number on it. This is where real shocker camein. It said TA7015D, which is audio Amplifier. Wait a minute, the schematic I found on the Internet says this should be 4901 DAC! Both are 8 pin DIP IC but was the kit supplied with the wrong IC chip?
      3) So I replaced a chip with 4901. I purchased it from when I ordered other parts. Now it seems to be working $50 value?
      4) If the kit was supplied with a wrong chip, then the poor guy who attempted to build it had no chance of this working.
      5) I also feel bad for people who is coming to electronic kit building these days. In my days, components were large. Solder pads were large and solder melting temperature was low due to lead in the solder. It is more difficult to work on PCB soldering even for me who I consider somewhat experienced in soldering.
      6) Bleep Drum is fun!
    • LPC 1768-H blue board
      1) This is a retired Arm cortex board on Sparkfun site. NGX saite is still selling it for $50 or so.
      2) When powered, the test LED was dim and there was no initial booting action where the LED was supposed to blink four times. Scoping the LED output confirmed it was blinking too fast. Somebody must have tried to download a blinky program but with a wrong timer value.
      3) I tried to connect to UART0 with USB-serial cable (using just black-GND, Green-RX0, White-TX0, no connection to red wire) connection after downloading flashmagic. Rebooting while sw press started a bootloader and I was connected. I reinstalled USB secondary bootloader.
      4) Now the USB bootloader started to work. I was able to drag and drop the initial bin file to the board. The board is now reinstated to its original shape. When powered up, LED blinks four times and wait to be programmed.
      5) But I don’t think I keep looking at this board because these days there are so many other options to jump into Arm micro controller more cheaply and easily . I am experimenting with FRDM-KL-25Z with mbed tool chain and its incredibly easy to use. Cypress PSoC now sells $4 board that comes with USB serial interface that can be snapped off for dedicated USB-UART cable afterwards. What a world are we living in?
    • Atmega 328P DIP
      1) Pins were all mangled up so I need to straighten them using a pair of tweezers. Popped into ISP programmer that I hacked with Arduino nano but AVRdude can not read the content. Its either a)broken, b)fuse is configured so can not be programmed without paralell programmer or c)fuse is set to use external crystal.
      2) Out of whim, I popped out the 328p from Arduino uno that I had and placed the 328p in question into Arduino board, loaded the blinky program and on-board LED started to blink. So this must be a 328p with arduino bootloader preloaded. $6 value.
    • More Atmega micro controllers (4 of them)Those are all SMT components. I probably would not be able to use them
    • SC300 wifi module x5
      This looks fantastic but I don’t know how I can use them in this SMT pinouts.
    • Header pins.I received about two dozens of solid header pins. It turns out a perfect fit for my NRI (National Radio Institute) Lab Trainer’s terminal pins which were too loose to connect jumper pins to. So I broke up these header pins to single pins and soldered on top of terminall pins on my trainer. Now the jumper wires slide into it very snuggly. The 35 years old electronics lab trainer regained a new life. Nice.

Will I try the dumpstar again? Maybe I will. The process of troubleshooting seemingly non-working product has some attraction in it.