2020年4月9日木曜日

Web Clip Icon(ホーム画面アイコン)からFileMaker Goが開けない。

iOS13.4.1
「このページを"FileMaker Go"で開きますか?」とダイアログが毎回出る。


2019/12/13

iOS13.3で直ったような。



2019/10/31

iOS 13.1.3|iPad
Apple Configurator 2 で作ったWeb Clip Icon(ホーム画面アイコン)からFileMaker Goが開けない。(正確には、1度は開くが2度目以降開かない...バックグラウンドのWeb Clipウインドウを閉じれば開く...)

2020年2月11日火曜日

FileMaker Serverでフィールド内容のエクスポート

Instead of "export field contents" on FileMaker Server

スクリプト:URL から挿入(cURL)、file:プロトコルで「フィールド内容のエクスポート」の代替。

変数を設定 [ $text; 値:"C:\Program Files\FileMaker\FileMaker Server\Data\Documents\テスト.png" ]
変数を設定 [ $WinPathUrlEnc; 値:GetUrlEncSJIS( $text ) ]/*カスタム関数*/
変数を設定 [ $DATA; 値:cURL::obj ]
変数を設定 [ $Path; 値:"file://" & $WinPathUrlEnc ]
URL から挿入 [ cURL::Result; $Path; cURL オプション: "-T $DATA" ] [ URL を自動的にエンコードしない; 選択; ダイアログなし ]
フィールド設定 [ cURL::Result; Get ( 最終エラー ) ]


カスタム関数 GetUrlEncSJIS( Text )
※Windowsは、パスをSHIFT-JISエンコードする
https://fm-aid.com/custom-function/1-shift-jis-url-code-127


Windows 10
Pro 17,18:OK
Server 18:ERROR
変数を設定 [ $Path; 値:"file:///" & ...

Windows Server 2016
Server 18:OK
変数を設定 [ $Path; 値:"file://" & ...


2021/06/16 追記
Macで検証
macOS:Hight Sierra(10.13.6)
FileMaker Server:17.0.1
ポイント:パスの指定を以下にする
file:///Library/FileMaker Server/Data/Documents/test.png

変数を設定 [ $path; 値:"file:///Library/FileMaker Server/Data/Documents/test.png" ]
変数を設定 [ $DATA; 値:test::obj ]
URL から挿入 [ test::Result; $path; cURL オプション: "-T $DATA" ] [ URL を自動的にエンコードしない; 選択; ダイアログなし ]
フィールド設定 [ test::Result; Get ( 最終エラー ) ]
レコード/検索条件確定 [ ダイアログなし ]

2020年2月7日金曜日

FileMaker 18|While関数のデバッグ・While関数を途中で止める

While関数のデバッグ・While関数を途中で止める


FileMaker 18
要プラグイン
ScriptMakerPS | FileMaker Plugin for Windows
FileMakerのフィールドに記述した「PowerShell」を実行し、戻り値を取得。
https://sites.google.com/site/scriptmakerps/


While関数で、途中の値をダイアログで確認。

While (
    [
        count = 0 ;
        total = 0 ;
        $a[1] = 25 ;
        $a[2] = 50 ;
        $a[3] = 75
    ] ;
    count < 3 ;
    [
        count = count + 1 ;
        total = total + $a[count];


        $$Value=List(count;total);
        $$ER=SMPS_ExecSync( "[System.Windows.MessageBox]::Show('" & $$Value & "')" )


    ] ;
    total
)



確認する値が、文字列で ' (シングルクォーテーション)を含む場合
While (
    [
        count = 0 ;
        total = 0 ;
        $a[1] = "ABC" ;
        $a[2] = "あいうえお" ;
        $a[3] = "'カキクケコ'"
    ] ;
    count < 3 ;
    [
        count = count + 1 ;
        total =List( total ; $a[count]);


        $$Value=List(count;Substitute ( total; "'" ; "''" )  );
        $$ER=SMPS_ExecSync( "[System.Windows.MessageBox]::Show('" & $$Value & "')" )


    ] ;
    total
)



While関数を途中で止める
While (
    [
        $$ER="";
        count = 0 ;
        total = 0 ;
        $a[1] = 25 ;
        $a[2] = 50 ;
        $a[3] = 75
    ] ;
    count < 3   and  $$ER ≠ "No";
    [
        count = count + 1 ;
        total = total + $a[count];


        $$Value=List(count;Substitute ( total; "'" ; "''" )  );
        $$ER=SMPS_ExecSync( "[System.Windows.MessageBox]::Show('" & $$Value & "', '' , 'YesNo')" )


    ] ;
    total
)