Issue in card layout

How to show task in card layout.

I don't know any idea about it.

  Discussion posts and replies are publicly visible

Parents
  • You basically need to create

    1. A task report
    2. An expression rule that queries the task report
    3. An interface to show the queried details inside a card layout!
  • Ya thats my need 

    I have created task report and now I want to show report data in card layout.

    a!localVariables(
      local!statuses:{
        "Assigned",
        "Accepted",
        "Delivered",
        "In transit",
      },
      filterValue:null,
      a!sectionLayout(
        contents: {
          a!dropdownField(
            label: "Status" ,
            placeholder: "Select status",
            choiceLabels: {
              "Assigned",
              "Accepted",
              "Delivered",
              "In transit"},
              choiceValues:enumerate(4) ,
              value: local!filterValue,
              saveInto: local!filterValue
    
    
          ),
          a!gridField(
            label: "My Report",
            data: a!queryProcessAnalytics(
              report: cons!CTA_ShowReport,
              query: a!query(
                filter:a!queryFilter(
                  field: "c1",
                  operator: "=",
                  value: local!filterValue,
                  applywhen:not( isnull(local!filterValue))
                ), 
                paginginfo:fv!pagingInfo
              )
            ),
            columns: {
              a!gridColumn(
                label: "name",
                value: a!linkField(
                  links: a!processTaskLink(
                    label: fv!row.c0,
                    task: fv!identifier
                  )
                )
              ),
              a!gridColumn(
                label: "process model",
                value: fv!row.c2
              ),
              a!gridColumn(
                label: "Status",
                value:if(
                  not(isnull(fv!row.c1)),
                  index(local!statuses,tointeger(fv!row.c1)+1,"other"),
                  "other"
                )
              ),
              a!gridColumn(
                label: "Assigne By",
                value: a!forEach(
                  items: fv!row.c4,
                  expression: if(
                    runtimetypeof(fv!item)=4,
                    user(fv!item,"firstName"),
                    group(fv!item,"groupName")
                  )
                )
    )
              
            },
            rowHeader: 1
          )
        }
    
      )
    )

  • 0
    Certified Senior Developer
    in reply to Sunil

    hint:
    you can put the task report results directly into the gridfield like you did.
    or you are loading it into a local.
    kind of like this:

    1
    2
    3
    4
    5
    6
    
    a!localVariables(
     local!report: a!queryProcessAnalytics(
       report: cons!AT_MY_TASKS_REPORT
     ),
     a!textField(readOnly: true, value: local!report)
    )
    Then you can exchange the textfield with a card layout and use textfields

  • 0
    Certified Lead Developer
    in reply to Sunil

    As per the above code, just put your gridField inside a card layout and you should be done. 

Reply Children
No Data