Depending on your use-case:
- Enter the current space/page by name, not as "current page" or "current space".
- Use the expert filter criteria with the placeholder $content to get the data.
- Current page: metadatafield.linkfield:$content.id
- Current space: metadatafield.linkfield:$content.getSpace()