I have a simple module which is a dropdown with the options populated by a SQL query, filtering on a user id.
campaignsQuery
select
campaigns.id,
campaigns.name
from
campaigns
join users on users.id = {{userId.value}} and users.status = 'active'
where
campaigns.status = 'active'
and exists(select 1 from "campaignUsers" where "campaignUsers"."campaignId" = campaigns.id and "campaignUsers"."userId" = users.id)
group by
campaigns.id,
campaigns.name
order by
campaigns.name
userId
is a data input, which defaults to ?ctUserId
from the quert string, which is useful for testing, however I explicitly pass this in from my apps.
This all works as expected when editing an app or previewing it, but as soon as I share it as a public link, the dropdown no longer populates.
Any idea why the dropdown wouldn't be populated only in a publicly shared report link?