JMP 們大家好,
我的(JMP 14.3.0,W10)意圖是編寫一個函數,該函數將表(dt)和唯一批號(uids)列表作為輸入,並通過連接每個 uid 的 dt 副本並填充來構造一個表在適當的批次中。 每個地點的編號資訊。 這樣做的目的是讓我稍後可以對錶進行聯接操作。 我正處於 JSL 學習曲線的早期階段,遇到以下錯誤:
意想不到的「如果」。 也許缺少“,”或“)”。 嘗試解析函數“For”的參數。
我認為我的函數或 For 循環存在語法問題,但在我看來,該語法與我似乎運行正常的其他程式碼相同。 非常歡迎任何/所有建議!
pop_limits_with_uids = Function( {dt, uids},
For( i = 1, i < N Items( uids ), i++,
Print( "here" );
If( i == 1,
pop_dt = dt << Subset( Output Table( "dt_copy" ), All rows, Selected columns only( 0 ) );
dt_copy = pop_dt;
Print( i );
,
dt_copy = dt << Subset( Output Table( "dt_copy" ), All rows, Selected columns only( 0 ) )
);
Column( dt_copy, "Lot No." )[{1, 2, 3}] = uids[i]; //dt_copy should have 3 rows. Set all 3 Lot No. to latest uid
pop_dt << concatenate( dt_copy, append to first table( 1 ) ); //add to the primary list
);
Close( dt_copy );
);
問候,
史考特