Skip to main content
sunilc0007
June 27, 2022
Question

Issue in card layout

  • June 27, 2022
  • 8 replies
  • 0 views

How to show task in card layout.

I don't know any idea about it.

    8 replies

    richardm900458
    June 27, 2022

    What do you mean by "showing a task"?

    sunilc0007
    June 27, 2022

    I want to show task in interface through card layout which is in tempo.

    richardm900458
    June 27, 2022

    I am not sure if we are in the same page how tasks are working in appian [emoticon:c4563cd7d5574777a71c318021cbbcc8]
    -> what do you mean by "showing as task"? meta details? 

    That somebody can "work on a task", for that you need an accordingly maintained interface.
    A cardlyout itself, is a interface element which is used in certain ways within an interface.
    So this question is really confusing....

    stefanhelzle0001
    Brainy
    June 27, 2022

    Would you please provide some details.

    As a preparation I suggest reading this: codeblog.jonskeet.uk/.../

    harshitb6843
    June 27, 2022

    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!
    sunilc0007
    June 27, 2022

    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
          )
        }
    
      )
    )

    richardm900458
    June 27, 2022

    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