New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In a condition, adding a rule to check if a filename on disk is null doesn't work #9740
Comments
Hello @ruihildt The source of this issue seems to be that the
Although each interface is capable of fetch its own related data.
So, instead of having multiple data split, maybe we could have a store with all data related to the item. What are your thoughts @rijkvanzanten? |
Hello @joselcvarela , as my goal is to just check whether there's an image or not, would it be possible to check whether there's a foreign key? Especially as the only data listed inside of an Image is an image ID (not sure if it's the same as the foreign key). |
Hello @ruihildt {
"_and": [
{
"input": {
"_nnull": true
}
},
{
"image": {
"_nnull": true
}
}
]
} Tell if it worked 👍 |
I can confirm it works, and pleasantly enough, it displays nicely in the visual rule editor. For my usecase, in the visual rules selector, I suggest you make clicking on an Image to select the whole object, so users can set a rule against it. |
This has been possible for a while, but was recently restricted from selecting nested or sub-object properties in #14818 to avoid confusions, while we await #8228 to be implemented. That being said, closing this in favor of tracking relational conditions feature in #8228. |
Preflight Checklist
Describe the Bug
I'm trying to conditionally display a notice based on whether an Input and an Image are correctly completed.
In order to do this, I added to the Notice the following rules:
While the input rule works, checking if the image filename on the disk is null doesn't.
To Reproduce
Errors Shown
None
What version of Directus are you using?
9.0.0
What version of Node.js are you using?
14.15.4
What database are you using?
12.5
What browser are you using?
Firefox
What operating system are you using?
Linux
How are you deploying Directus?
Docker
The text was updated successfully, but these errors were encountered: