이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

get Operator (Examples)

2023년 3월 25일 오후 4:34

[all[current]get[draft.of]]
→ the title of the tiddler of which the current tiddler is a draft

[get[tags]]
→ returns the tags of all tiddlers without de-duplication

[get[tags]unique[]]
→ returns the tags of all tiddlers with de-duplication

Tip
If a data tiddler contains a field with an empty value, the empty string is not appended to the results.

[all[current]get[myfield]]
→ the empty value of field myfield is not returned by the get operator

[all[current]has:field[myfield]] :map[get[myfield]]
→ also returns the empty string

The above example works by first checking if the input title has the field myfield and then using the Map Filter Run Prefix to replace the title with their value of that field. If the input tiddler does not have the field, an empty selection is returned. The subsequent Map Filter Run Prefix outputs an empty string when its run returns an empty selection (because the field is empty).

[all[tiddlers]] :filter[get[created]compare:date:lt{HelloThere!!created}]
→ return all tiddlers that are older than HelloThere

The above example demonstrates two different ways of accessing field values in filters: Use get when the title is not known in advance as with the Filter Filter Run Prefix where currentTiddler is set to the current input title. Use a TextReference as an indirect Filter Parameter when the title is known.