我有一個FileMaker 14事件數據庫。我希望能夠用關鍵字標記每個事件。因此,我創建了一個三個表,結構如此:在FileMaker中創建關鍵字/標籤系統14
活動--- <標籤> ---關鍵詞現在
,以作爲標籤添加關鍵字到一個事件,我要確保該關鍵字尚未添加,並存在於關鍵字表格中。如果它不存在,應該創建它,然後添加爲標籤。
爲了實現這一點,我想我可以有一個全球領域,用戶輸入他們想要的關鍵字。然後腳本將執行以下操作:
Enter keyword in global field
Set variable $eventID wtih ID of current event
Set variable $keyword with value from global field
Check if $keyword is present in Keywords table
if yes
get id of $keyword and put in variable $keywordID
check if $keywordID is already tagged to event
if yes
display message, "this keyword has already been added to this event"
if no
create new record in Tags table with $keywordID and $eventID
clear global field
exit script
if no
create new record in Keywords table with $keyword value in keyword field
set variable $keywordID with value of id field
create new record in Tags table with $keywordID and $eventID
clear global field
exit script
這是我試圖編寫的分步腳本。但是,我堅持如何檢查關鍵字表中是否存在$關鍵字,以及如何從關鍵字表中獲取該關鍵字的ID。
請讓我知道你是否有建議,或者是否有更簡單的方法來解決這個問題。
謝謝你的回答。我通過在佈局上使用標籤表的入口來解決這個問題,但是使其不可見。然後,我轉到該佈局對象,並使用用戶輸入的值創建新記錄。 – mattbowlby