Datasource with User.id and Facility.id through params.id


#1

I am trying to build a datasource that will filter by both the User’s facility selection and the User’s id. I have:

   dataSource ManageAlertSubscriptionsData {
      "collection": true,
      "c3type": "ApplicationAlertEngine",
      "c3function": "getAlertSubscriptionPreferences",
      "responseSelector": "objs",
      "c3arguments": {
         "spec": {
            "filter": "source.id == '{{ params.id }} && user.id == {{ <what goes here??> }}'",
            "include": "source.name, alert.name, user.name, subscribed"
         }
      }
   }
}

Is there some way to pass the user ID through? I am a little unfamiliar with params. How can I check what the page params would be at that point or potentially add the user Id to them?


#2

environment.session.user.user.id I believe