Mass update of limited values

I used to have a process which updated limited values based on a query, but now it seems that it's not working anymore (I assume it's because of version upgrade 8.1.4 -> 9.1).

I also tried to update the limited values with an update clause from Object Browser, but it seems that the values are not updated. This is also something that I have done earlier, so something is changed.

I would really thankful if someone is able to show how I can update those limited values with an process.

Parents
  • At some point in time between v8.1 and v9.1, limited values were moved from a field on DialogColumn to a separate table: QBMColumnLimitedValue. Therefore you need to do your inserts/updates there.
    Code example:

    Private Sub CCC_HandleLimitedValue(UID_Column as String, key As String, Optional description As String = Nothing)
        If Not Session.
                Source().
                Exists(Query.
                From(Table.QBMColumnLimitedValue).
                Where(Function(c) c.Column(Table.QBMColumnLimitedValue.UID_DialogColumn) = UID_Column And c.Column(Table.QBMColumnLimitedValue.KeyValue) = key).
                Exists()) Then
            Dim limitedValue = New QBMColumnLimitedValue(Session) With {
                .UID_DialogColumn = UID_Column,
                .KeyValue = key,
                .KeyDisplay = description
            }
            limitedValue.Save(Session)
        End If
    End Sub
    

Reply
  • At some point in time between v8.1 and v9.1, limited values were moved from a field on DialogColumn to a separate table: QBMColumnLimitedValue. Therefore you need to do your inserts/updates there.
    Code example:

    Private Sub CCC_HandleLimitedValue(UID_Column as String, key As String, Optional description As String = Nothing)
        If Not Session.
                Source().
                Exists(Query.
                From(Table.QBMColumnLimitedValue).
                Where(Function(c) c.Column(Table.QBMColumnLimitedValue.UID_DialogColumn) = UID_Column And c.Column(Table.QBMColumnLimitedValue.KeyValue) = key).
                Exists()) Then
            Dim limitedValue = New QBMColumnLimitedValue(Session) With {
                .UID_DialogColumn = UID_Column,
                .KeyValue = key,
                .KeyDisplay = description
            }
            limitedValue.Save(Session)
        End If
    End Sub
    

Children