When trying to add a new row, it takes me to a random row that is already on the data

A Score Level 1

When I click on "add request url value" It takes me to a random row that it in that data already. But I want it to take me to a new and clear row. 

 addRowlink: a!dynamicLink(
            label: "Add Request URL Value",
            value: {
              CRETD_BY_USER_ID: loggedInUser(),
              CRETD_TMST: now(),
            },

  Discussion posts and replies are publicly visible

Parents
  • 0
    A Score Level 1
    in reply to Mike Schmitt

              addRowlink: a!dynamicLink(
                label: "Add Request URL Value",
                value: {
                  CRETD_BY_USER_ID: loggedInUser(),
                  CRETD_TMST: now(),
                },
                saveInto: {
    /*### Reset the grid to make sure its always showing the most current info. Only resets if Edit button wasnt already pressed.*/
                  if(ri!readOnlyRequestUrl = true,
                  {
                    a!save(ri!requestUrlInputs, {}),
                    a!save(ri!requestUrlInputs, rule!TMT_GetAllTMTREQURL())
                  },
                  {}
                  ),
                  a!save(ri!requestUrlInputs, append(ri!requestUrlInputs, save!value)),
                  a!save(ri!readOnlyRequestUrl, false),
                  a!save(local!newRowCount, local!newRowCount + 1),
    /*### Adds a Temp number incase there are no records. Fixes alot of problems.*/
                  if(rule!APN_isEmpty(ri!requestUrlInputs),
                  a!save(ri!requestUrlInputs.URL_ID[1], 1),
                  {}
                  ),
                  a!save(local!dropdownSelectedID, tointeger(max(local!totalRowIndex) + 1))
                  /*a!save(ri!requestUrlInputs[(local!totalRowIndex + 1)].default, false),*/
                }
              ),
              rowHeader: 1
            ),
              ),

  • 0
    Appian Employee
    in reply to Beth

    Is it necessary to save into the same ri!requestUrlInputs so many times? I'd suggest trying to format the output of your data so that you only need to save to the variable a single time.

    I'm not certain this is the problem, but I think it will be a lot easier to troubleshoot, because you don't have to worry about the saves happening in a certain order. 

Reply
  • 0
    Appian Employee
    in reply to Beth

    Is it necessary to save into the same ri!requestUrlInputs so many times? I'd suggest trying to format the output of your data so that you only need to save to the variable a single time.

    I'm not certain this is the problem, but I think it will be a lot easier to troubleshoot, because you don't have to worry about the saves happening in a certain order. 

Children
No Data