We need to avoid duplicate selections from a dropdown list (this list is populated from a report definition). Or how to delete a selection from the list? and perhaps put it back if the user deletes his/her selection? Any ideas how can we do this?
The list of choices in the dropdown is unique. But the user can select the same row from the dropdown multiple times, and the user doesn't want to have available the same choice from the dropdown was it was selected. Or at least not be able to select a choice that was previously selected.
pxDropDown displays whatever the values present in the source. If it's sourced from a Report Definition, all the values corresponding to that column will be displayed. pxDropdown will not check for any uniqueness.
You might have to introduce a mechanism to update the result set and source it to Dropdown.
Ex: Use an activity to filter the results and copy them onto a DataPage.
The list of choices in the dropdown is unique. Currentlt, the user can select the same row from the dropdown multiple times, and the user doesn't want to have available the same choice from the dropdown once a choice has been selected. Or at least not be able to select a choice that was previously selected.
You can configure an on change-run activity action set on the dropdown and in this activity you can update the source of the DD. For example, lets say there is a dropdown with 5 values (A,B,C,D,E), mapped to a DataPage DP1. So when user selects any value from the dropdown, say A, then set the value of a temporary variable/property, say TempAlreadySelectedValue and pass it to the DataPage DP1 as parameter. Have a logic on this Data Page such that it won't have the value in its list which has been passed as parameter. But make sure, not to do the refresh section as it will remove the already selected value from DropDown.
We worked around it with a Data Transform that will compare the current selection to the previous selection(s). If it is duplicate, we are deleting the current selection. Everything else remains the same. This data transform triggers the user makes a selection. On the "Actions" tab of the dropdown, action set 1, upon "Change", Actions: Post value (default), "Refresh-This section", Target "section", data transform: The name of the data transform.