FileMaker スクリプト:URLから挿入 で、Windowsの場合、プロトコル「file://」や「smb://」を使う場合、日本語(全角混じり)のパスではエラーになります。
以下の式でURLエンコードすればOK。

関数 : While 版

FileMaker 18以降

 

SHIFT-JIS, SHIFT_JIS, エンコード

function(関数):
Sample input(入力例):
Sample output(出力例):
formula(式):

While (
    [
#Val = Text ;
$Result="";  
#MAX = Length ( #Val )  ;
#n = 1
    ] ;
    #n   ≤   #MAX ;
    [
        #text=Middle ( #Val ; #n ; 1 );
              $Result = $Result  & If(Code ( #text )>127;

	While (
	[
		#txt = HexEncode ( TextEncode ( #text ; "shift_jis" ; 1 ) ) ;
		#pos = Length ( #txt ) - 1
	];
	#pos > 0  ;
	[
		#txt = Replace ( #txt ; #pos ; 0 ; "%" ) ;
		#pos = #pos - 2
	];
	#txt
	 )
;
            Middle ( #Val ; #n ; 1 )
           );//if
#n = #n + 1
    ] ;
    $Result
)