<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>SharePoint on qwerty.work</title>
        <link>https://qwerty.work/tags/sharepoint/</link>
        <description>Recent content in SharePoint on qwerty.work</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>ja-JP</language>
        <lastBuildDate>Wed, 25 May 2022 14:10:57 +0900</lastBuildDate><atom:link href="https://qwerty.work/tags/sharepoint/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>【SharePoint】編集フォームのレイアウトを変更する方法メモ</title>
            <link>https://qwerty.work/post/2022/05/sharepoint-foem-layout/</link>
            <pubDate>Wed, 25 May 2022 14:10:57 +0900</pubDate>
            <guid>https://qwerty.work/post/2022/05/sharepoint-foem-layout/</guid>
            <description>&lt;h2 id=&#34;フォームのレイアウトを複数列にしたい&#34;&gt;フォームのレイアウトを複数列にしたい&#xA;&lt;/h2&gt;&lt;p&gt;ShraePointのリストに新規レコードを追加したり、既存のレコードを編集したりする際、デフォルトの状態だとフィールドが縦一列に並んで表示されます。フィールド（列）が少ないと問題ありませんが、登録したい項目が多いとスクロールしたり、情報が部分的にしか見れないため不便です。&lt;/p&gt;&#xA;&lt;p&gt;そこで、複数列にできないか方法を探したところ、「レイアウトの構成」から「コードの書式設定」にJSON形式で設定を記述すれば、ある程度はカスタマイズできることがわかりました。参考になったページをメモ。&lt;/p&gt;&#xA;&lt;h3 id=&#34;参考ページ&#34;&gt;参考ページ&#xA;&lt;/h3&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://www.micknabewata.com/entry/sharepoint/list-form-configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://www.micknabewata.com/entry/sharepoint/list-form-configuration&#34; alt=&#34;https://www.micknabewata.com/entry/sharepoint/list-form-configuration&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://www.micknabewata.com/entry/sharepoint/list-form-configuration&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://www.micknabewata.com/entry/sharepoint/list-form-configuration&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://idea.tostring.jp/?p=6886&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://idea.tostring.jp/?p=6886&#34; alt=&#34;https://idea.tostring.jp/?p=6886&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://idea.tostring.jp/?p=6886&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://idea.tostring.jp/?p=6886&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://pa-wsc.work/2022/03/31/spo_json_list_custom/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://pa-wsc.work/2022/03/31/spo_json_list_custom/&#34; alt=&#34;https://pa-wsc.work/2022/03/31/spo_json_list_custom/&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://pa-wsc.work/2022/03/31/spo_json_list_custom/&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://pa-wsc.work/2022/03/31/spo_json_list_custom/&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://qiita.com/maekawawawa/items/b814d08cefb3911b5cf9&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://qiita.com/maekawawawa/items/b814d08cefb3911b5cf9&#34; alt=&#34;https://qiita.com/maekawawawa/items/b814d08cefb3911b5cf9&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://qiita.com/maekawawawa/items/b814d08cefb3911b5cf9&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://qiita.com/maekawawawa/items/b814d08cefb3911b5cf9&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h4 id=&#34;マイクロソフトのページ&#34;&gt;マイクロソフトのページ&#xA;&lt;/h4&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://docs.microsoft.com/ja-jp/sharepoint/dev/declarative-customization/list-form-configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://docs.microsoft.com/ja-jp/sharepoint/dev/declarative-customization/list-form-configuration&#34; alt=&#34;https://docs.microsoft.com/ja-jp/sharepoint/dev/declarative-customization/list-form-configuration&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://docs.microsoft.com/ja-jp/sharepoint/dev/declarative-customization/list-form-configuration&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://docs.microsoft.com/ja-jp/sharepoint/dev/declarative-customization/list-form-configuration&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;複数列にしたいときの書式例&#34;&gt;複数列にしたいときの書式例&#xA;&lt;/h2&gt;&lt;p&gt;とりあえず、以下の書式を「コードの書式設定」に貼り付けて必要なフォールド名を書き換えていくことで、感覚が掴めると思います。&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{&#xA;    &amp;#34;sections&amp;#34;: [&#xA;        {&#xA;            &amp;#34;displayname&amp;#34;: &amp;#34;&amp;#34;,&#xA;            &amp;#34;fields&amp;#34;: [&#xA;                &amp;#34;Title&amp;#34;&#xA;            ]&#xA;        },&#xA;        {&#xA;            &amp;#34;displayname&amp;#34;: &amp;#34;Details&amp;#34;,&#xA;            &amp;#34;fields&amp;#34;: [&#xA;                &amp;#34;Department&amp;#34;,&#xA;                &amp;#34;Email&amp;#34;,&#xA;                &amp;#34;Country&amp;#34;&#xA;            ]&#xA;        },&#xA;        {&#xA;            &amp;#34;displayname&amp;#34;: &amp;#34;Application&amp;#34;,&#xA;            &amp;#34;fields&amp;#34;: [&#xA;                &amp;#34;Application Id&amp;#34;,&#xA;                &amp;#34;Approver&amp;#34;,&#xA;                &amp;#34;Reviewer&amp;#34;&#xA;            ]&#xA;        }&#xA;    ]&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;ヘッダーのカスタマイズ&#34;&gt;ヘッダーのカスタマイズ&#xA;&lt;/h2&gt;&lt;h3 id=&#34;簡易版&#34;&gt;簡易版&#xA;&lt;/h3&gt;&lt;p&gt;とりあえず、ヘッダーに色の付いたタイトルを表示したいときは以下ソースを「ヘッダー」の「コードの書式設定」に貼り付ければ適用できます。&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{&#xA;    &amp;#34;elmType&amp;#34;: &amp;#34;div&amp;#34;,&#xA;    &amp;#34;attributes&amp;#34;: {&#xA;        &amp;#34;class&amp;#34;: &amp;#34;ms-borderColor-neutralTertiary, ReactClientFormDefaultHeader&amp;#34;&#xA;    },&#xA;    &amp;#34;style&amp;#34;: {&#xA;        &amp;#34;width&amp;#34;: &amp;#34;99%&amp;#34;,&#xA;        &amp;#34;border-top-width&amp;#34;: &amp;#34;0px&amp;#34;,&#xA;        &amp;#34;border-bottom-width&amp;#34;: &amp;#34;1px&amp;#34;,&#xA;        &amp;#34;border-left-width&amp;#34;: &amp;#34;0px&amp;#34;,&#xA;        &amp;#34;border-right-width&amp;#34;: &amp;#34;0px&amp;#34;,&#xA;        &amp;#34;border-style&amp;#34;: &amp;#34;solid&amp;#34;,&#xA;        &amp;#34;border-color&amp;#34;: &amp;#34;#ccc&amp;#34;,&#xA;        &amp;#34;margin-bottom&amp;#34;: &amp;#34;16px&amp;#34;,&#xA;        &amp;#34;color&amp;#34;: &amp;#34;#974B8B&amp;#34;&#xA;    },&#xA;    &amp;#34;txtContent&amp;#34;: &amp;#34;=[$Title]&amp;#34;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;アイコン付き版&#34;&gt;アイコン付き版&#xA;&lt;/h3&gt;&lt;p&gt;ヘッダーにアイコン付きのタイトルを表示したいときのソース。&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{&#xA;    &amp;#34;elmType&amp;#34;: &amp;#34;div&amp;#34;,&#xA;    &amp;#34;attributes&amp;#34;: {&#xA;        &amp;#34;iconName&amp;#34;: &amp;#34;Group&amp;#34;,&#xA;        &amp;#34;class&amp;#34;: &amp;#34;ms-borderColor-neutralTertiary, ReactClientFormDefaultHeader&amp;#34;&#xA;    },&#xA;    &amp;#34;style&amp;#34;: {&#xA;        &amp;#34;width&amp;#34;: &amp;#34;99%&amp;#34;,&#xA;        &amp;#34;border-top-width&amp;#34;: &amp;#34;0px&amp;#34;,&#xA;        &amp;#34;border-bottom-width&amp;#34;: &amp;#34;1px&amp;#34;,&#xA;        &amp;#34;border-left-width&amp;#34;: &amp;#34;0px&amp;#34;,&#xA;        &amp;#34;border-right-width&amp;#34;: &amp;#34;0px&amp;#34;,&#xA;        &amp;#34;border-style&amp;#34;: &amp;#34;solid&amp;#34;,&#xA;        &amp;#34;border-color&amp;#34;: &amp;#34;#ccc&amp;#34;,&#xA;        &amp;#34;margin-bottom&amp;#34;: &amp;#34;16px&amp;#34;,&#xA;        &amp;#34;color&amp;#34;: &amp;#34;#974B8B&amp;#34;&#xA;    },&#xA;    &amp;#34;txtContent&amp;#34;: &amp;#34;=[$Title]&amp;#34;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;アイコンについて&#34;&gt;アイコンについて&#xA;&lt;/h4&gt;&lt;p&gt;タイトルの左側に表示されるアイコンは&lt;code&gt;&amp;quot;iconName&amp;quot;: &amp;quot;Group&amp;quot;&lt;/code&gt;で指定していますが、他のアイコンに変更したいときは以下のページでアイコンを探し、アイコン名を変更すれば可能です。&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://uifabricicons.azurewebsites.net/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://uifabricicons.azurewebsites.net/&#34; alt=&#34;https://uifabricicons.azurewebsites.net/&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://uifabricicons.azurewebsites.net/&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://uifabricicons.azurewebsites.net/&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://developer.microsoft.com/en-us/fluentui#/styles/web/icons#icons&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://developer.microsoft.com/en-us/fluentui#/styles/web/icons#icons&#34; alt=&#34;https://developer.microsoft.com/en-us/fluentui#/styles/web/icons#icons&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://developer.microsoft.com/en-us/fluentui#/styles/web/icons#icons&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://developer.microsoft.com/en-us/fluentui#/styles/web/icons#icons&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;カテゴリによってアイコンを切り替えたいとき&#xA;以下のページによると、IF文を使ってカテゴリ名によって表示するアイコンを切り替えることができるようです。&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://www.hogehoge-note.com/2020/02/15/post-695/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://www.hogehoge-note.com/2020/02/15/post-695/&#34; alt=&#34;https://www.hogehoge-note.com/2020/02/15/post-695/&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://www.hogehoge-note.com/2020/02/15/post-695/&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://www.hogehoge-note.com/2020/02/15/post-695/&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;その他参考ページ&#34;&gt;その他参考ページ&#xA;&lt;/h2&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://qiita.com/Momono_gg/items/58bf768fb83bddfbdca1&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://qiita.com/Momono_gg/items/58bf768fb83bddfbdca1&#34; alt=&#34;https://qiita.com/Momono_gg/items/58bf768fb83bddfbdca1&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://qiita.com/Momono_gg/items/58bf768fb83bddfbdca1&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://qiita.com/Momono_gg/items/58bf768fb83bddfbdca1&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://qiita.com/Momono_gg/items/dc6b3253e4c0c64cf170&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://qiita.com/Momono_gg/items/dc6b3253e4c0c64cf170&#34; alt=&#34;https://qiita.com/Momono_gg/items/dc6b3253e4c0c64cf170&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://qiita.com/Momono_gg/items/dc6b3253e4c0c64cf170&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://qiita.com/Momono_gg/items/dc6b3253e4c0c64cf170&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;</description>
        </item></channel>
</rss>
