---------------Rule which returns ExportableDataSubset------------------- with( local!anotherDataset: todatasubset( {{name: "Chetan", val: 25}}, topagingInfo(1,-1) ) , 'type!{urn:appian:plugin:datasubsetdownload:types}ExportableDataSubset'( filename: if(ri!input=1, "Test", "No-Test"), fieldNames: {"name", "val"}, datasubset: local!anotherDataset /* Instead of local variable also tried to pass it directly here using todatasubset*/ ) ) ------------------Rule which calls the above rule to generate a link----------------- with( local!exportUri: getdatasubsetdownloadlinkfromrule( rule: rule!61L_exportDataForExcelReports, input: 1 ), if(fn!isnull(local!exportUri), a!textField( label: "Status", value: "did not load", readOnly: true ) , a!dashboardLayout( firstColumnContents: { a!linkField( label: "Please click", links: { a!safeLink( label: "Click Here to Export This Data to Excel", uri: local!exportUri ) } ) } ) ) )