Multiple columns from the same relationship in an ExportAction
Heya everyone!
I am trying to create an export, and I need to get two columns computed aggregating the same relationship, with a different scope.
For example: User has a relationship with Post (1:N). Post has a type field that can either be 'video' or 'image'. In my User export, I'd like to have two columns "has videos" and "has images".I can do one just fine doing something like But if I try to add another for the images I need to use the same column name (
posts_exists
) and it breaks.
Is there any way to get it done?
For now I've resorted to creating two "scoped" relationships, but I'd like to avoid it if possible.Solution:Jump to solution
In the end I went with the custom relationships, I only had two so it was not that bad.
3 Replies
maybe use
That would not work, the aggregated field gets labeled "posts_exists", giving it the name "id" would show the id not the result of the exists.
Solution
In the end I went with the custom relationships, I only had two so it was not that bad.