Is there any way to get 'Update Row' to only update a specific column in the row?

repeater-widget

#1


I have repeater rows with several columns of data that the user can update. My problem is that every time i need to use ‘Update Rows’ to change the data to user inputs, it resets the whole row due to ‘Item Loaded’ on the repeater. Is there any way to just update a row’s specific column and not change the rest?


#2

Repeaters reload every time they are ‘touched’ by an interaction, like updating a row. This reevaluates and reloads the whole repeater, row by row. If you have multiple fields or widgets in a row that a user can interact with, but you only make one of them perform an ‘update row’ action, then the changed values for the other widgets won’t be stored - they will be overwritten by the default values when the repeater reloads.
You can get around this by either making every widget fire an ‘update row’ action when it gets changed, or updating all of your columns with whatever the edited values are on your widgets (this would be useful for a repeater row with a ‘Save changes’ button on it, for example).
If you post your .rp file with a specific thing you’re trying to achieve, we’ll be better able to help.


#3

The solution to this should be made a sticky in my opinion. Seems like it gets asked quite a lot in various guises.


#4

I have a similar issue but I am dealing with time so it’s trickier. I have a repeater in which I can add rows. As soon as the row is added, the ‘time in’ is using the Now.toLocalTime function. I want to demo that the person can be clocked out and change the time for the Time Out column to the local time while retaining the Time in. The problem is, I am editing the marked row and changing the word ‘In’ in the top row to ‘Out’ and as mentioned, it resets everything. Is there anyway to retain the info?


#5

You’ll need to post your .rp file as there are so many reasons that could be happening.


#6

The mechanism in AXURE is that when you make any changes to any column data in a row, the data of all rows in the repeater will be reloaded. There is no way to change this behavior.
For example, if you select any element in a row, the reload will unselect it.
If you want to maintain the selection of an element after changing the data, you can control the selection state with data. For instance, you can add a column in the repeater’s data table to control the selection status.
You can refer to this case to control the comlunm states. More tutorial contents.


#7

Hi Dave, do you know of any way to prevent the reload of the repeater?

Basically I want to accept a value (which works fine) and the repeater not refresh so the table isn’t re-sorted.

I’m sure I can fake it with having a duplicate of the original value in a hidden field and sorting on that until I want the update to happen, but is there an easier way just by preventing the repeater from reloading?

Thanks.


#8

You can have any widget be interactable inside a repeater row (like a dropdown) without attaching an event to it which will cause a refresh. However, if there’s any change to row data, or a sort or filter applied, that widget will revert to the default state.

However, if you want changes to a widget (like a dropdown selection) to persist when the repeater is refreshed (by a sort, filter or row edit) then you have to store it as a value, there’s no way around that that I’m aware of.


#9

Thanks fella, much appreciated.