Grid field to have a change in variable.

Certified Senior Developer

Hi guys,

I am having a grid where a set of data will be on display. In a column I have used Icon indicator and a dynamic link. When I click it should change from true to false or false to true and the respective icon sholud change in the grid. Any solution for that. I have tried some ways but in the save option of dynamic link I am struck. Thanks in Advance.

Regards,

Kavya

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    there are several issue not quite fine:

    • dynamiklink with value and saveInto which contains only an a!save
    • the if clauses with fv!item=1,
    • checking index(local!data,"active",{}),  but storing the date in a rule input
      a!gridImageColumn(
        label: "Active?",
        field: "active",
        data: {
          a!forEach(
            items: index(
              local!data,
              "active",
              {}
            ),
            expression: {
              a!documentImage(
                document: a!iconIndicator(
                  icon: "STATUS_OK"
                ),
                caption: "Yes",
                link: a!dynamicLink(
                  label: "change",
                  saveInto: {
                    a!save(
                      target:local!data[fv!index].active,
                      value: true
                    ),
                    /*bot sure if necerssary, depends on your construct*/
                    a!save(
                      target:ri!change[fv!index],
                      value: true
                    )
                  }
                ),
                showWhen: toboolean(fv!item)=true
              ),
              a!documentImage(
                document: a!iconIndicator(
                  icon: "STATUS_NOTDONE"
                ),
                caption: "No",
                link: a!dynamicLink(
                  label: "change",
                  saveInto: {
                    a!save(
                      target:local!data[fv!index].active,
                      value: false
                    ),
                    /*bot sure if necerssary, depends on your construct*/
                    a!save(
                      target:ri!change[fv!index],
                      value: false
                    )
                  }
                ),
                showWhen: toboolean(fv!item)=false
              )
            }
          )
        }
      )

      try this

      edit: sorry wrong person i replied to 
Children