Swap two rows in readable grid

Hi, I have readable grid in which i am using arrow icon, so if I click on that arrow so that row should go up and upper row should come down. I can get all data items from current row, but how I will get data from previous row, So I can apply swapping conditiin

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    HI  

    Use the below code in saveinto parameter of your dynamic link for moving up

     a!save(
                                  local!data,
                                  insert(local!data, fv!item, fv!index - 1)
                                ),
                                a!save(
                                  local!data,
                                  remove(local!data, fv!index + 1)
                                )

    Use the below code in saveinto parameter of your dynamic link for moving down

    a!save(
                                  local!data,
                                  insert(local!data, fv!item, fv!index + 2)
                                ),
                                a!save(
                                  local!data,
                                  remove(local!data, fv!index)
                                )

Reply
  • 0
    Certified Senior Developer

    HI  

    Use the below code in saveinto parameter of your dynamic link for moving up

     a!save(
                                  local!data,
                                  insert(local!data, fv!item, fv!index - 1)
                                ),
                                a!save(
                                  local!data,
                                  remove(local!data, fv!index + 1)
                                )

    Use the below code in saveinto parameter of your dynamic link for moving down

    a!save(
                                  local!data,
                                  insert(local!data, fv!item, fv!index + 2)
                                ),
                                a!save(
                                  local!data,
                                  remove(local!data, fv!index)
                                )

Children
No Data