Select to view content in your preferred language

Pass date selector variables to list item using data expression?

207
0
02-25-2025 10:22 PM
ECarson
Occasional Contributor

Hi,

Is it possible to pass/access the data selector variable(s) in a lists data expression?

  1. If possible how do you set it up in the date selector?
  2. How do you retrieve it in the data expression?
var portal_ = Portal("https://myportal.com/portal");

var fromDate = <date_selector.minDate> //'2025-01-25'
var toDate = <date_selector.maxDate> //'2025-02-01'
var expression = "date_captured > '" + fromDate + "' and date_captured < '" + toDate + "'"

var fs = Filter(FeatureSetByPortalItem(portal_,"9f45d78ed9034d9fb45ab84066f9c1de",2,['name','date_captured','number'],false),expression);

var grBy =  GroupBy(fs, 'name',{name: 'Total', expression: '1', statistic: 'COUNT'});

return OrderBy(grBy, 'Total DESC')

 

Thanks for any help,

Elliott

 

0 Kudos
0 Replies