I get the firstname and lastname in a single row, whereas the outcome should be one value per row

Hello ,

I am trying to create a report, with a document download link using: getdatasubsetdownloadlinkfromrule,
I am able to display the data in excel sheet, there are 1 cdt, which has 4 fields, app,group, firstname and lastname, out of which firstname and lastname are of multiple type.
The problem is I get the firstname and lastname in a single row, whereas the outcome should be one value per row, I have verified the length of that cdt.firstname, it returns the exact number of lenght, but in excel it is showing as a row
Let meknow what am i missing, below is the code snippet:

In main rule:

local!linkdata: todatasubset(local!cdt, local!pagingInfo1),
                    local!ruleURI: getdatasubsetdownloadlinkfromrule(rule: rule!GenerateExcelRule, input: tostring(a!toJson(local!linkdata))),

In subrule:
=with(
local!search: a!fromJson(ri!input),
'type!{urn:appian:plugin:datasubsetdownload:types}ExportableDataSubset'(
filename: "Exported Data",
fiel...

OriginalPostID-142594

OriginalPostID-142594

  Discussion posts and replies are publicly visible

Parents
  • Hello I have tried recreating the datasubset in inner rule, but still for firstname and last name it is displaying result in a single row, The code snipped is:
    local!ruleURI: getdatasubsetdownloadlinkfromrule(rule: rule!GenerateExcelRule, input: a!toJson(
                        {
                        app: ri!app,
                        group: ri!group,
                        firstname: local!cdt.firstname,
                        lastname: local!cdt.lastname
                        }))

    inner rule:

    =with(
    local!pagingInfo1: a!pagingInfo(startIndex: 1, batchSize: -1),
    local!search: a!fromJson(ri!input),
    local!newData: rule!generatecdt(local!search.app, local!search.group, local!search.firstname, local!search.lastname),
    local!DataSubset: todatasubset(
    local!newData,
    local!pagingInfo1
    ),
    'type!{urn:appian:plugin:datasubsetdownload:types}ExportableDataSubset'(
    filename: "Exported Data",
    fieldNames: {
               "app",
    "group",
    "firstname",
    "lastname"
    },
    fieldLabels: {
               "app",
    "Group",
    "FirstName",
    "LastName"
    },
    datasubset: local!DataSubset          )
    )

    what couldbe the issue
Reply
  • Hello I have tried recreating the datasubset in inner rule, but still for firstname and last name it is displaying result in a single row, The code snipped is:
    local!ruleURI: getdatasubsetdownloadlinkfromrule(rule: rule!GenerateExcelRule, input: a!toJson(
                        {
                        app: ri!app,
                        group: ri!group,
                        firstname: local!cdt.firstname,
                        lastname: local!cdt.lastname
                        }))

    inner rule:

    =with(
    local!pagingInfo1: a!pagingInfo(startIndex: 1, batchSize: -1),
    local!search: a!fromJson(ri!input),
    local!newData: rule!generatecdt(local!search.app, local!search.group, local!search.firstname, local!search.lastname),
    local!DataSubset: todatasubset(
    local!newData,
    local!pagingInfo1
    ),
    'type!{urn:appian:plugin:datasubsetdownload:types}ExportableDataSubset'(
    filename: "Exported Data",
    fieldNames: {
               "app",
    "group",
    "firstname",
    "lastname"
    },
    fieldLabels: {
               "app",
    "Group",
    "FirstName",
    "LastName"
    },
    datasubset: local!DataSubset          )
    )

    what couldbe the issue
Children
No Data