Dynamic grid BatchSize

Hi All,

I have a usecase where I need to pass the dynamic values for the batchsize for the grid. Initially grid should have a default value of 25.Then user can able to change the batchsize and I should validate the batchsize should not be less than 1 and greater than 50.I tried with local variables by using "with" and it is not allowing me to save the values.Any help would be appreciate it.

TIA.

OriginalPostID-232411

  Discussion posts and replies are publicly visible

Parents
  • with(local!activeBatchSize:25,
    a!sectionLayout(firstColumnContents:{a!integerField(
    label: "Results per Page",
    labelPosition: "ABOVE",
    value:ri!batchSize,
    saveInto: {
    local!activeBatchSize,
               a!save(
               ri!batchSize,
               if(or(save!value=0,save!value<0),ri!batchSize, save!value)
               )
               },
    validations:if(or(tointeger(local!activeBatchSize)=0,tointeger(local!activeBatchSize)<1,tointeger(local!activeBatchSize)>50),"Please enter a number between 1 and 50",{})
    )}))

    Note:ri!batchSize will be loaded with value 25
Reply
  • with(local!activeBatchSize:25,
    a!sectionLayout(firstColumnContents:{a!integerField(
    label: "Results per Page",
    labelPosition: "ABOVE",
    value:ri!batchSize,
    saveInto: {
    local!activeBatchSize,
               a!save(
               ri!batchSize,
               if(or(save!value=0,save!value<0),ri!batchSize, save!value)
               )
               },
    validations:if(or(tointeger(local!activeBatchSize)=0,tointeger(local!activeBatchSize)<1,tointeger(local!activeBatchSize)>50),"Please enter a number between 1 and 50",{})
    )}))

    Note:ri!batchSize will be loaded with value 25
Children
No Data