Skip to main content
1-Visitor
October 24, 2016
Question

Disable button when Selected row is undefined

  • October 24, 2016
  • 1 reply
  • 2282 views

I have a mashup with a repeater which got his data from a function that returns an Infotable. Now I want to disable a button if nothing is selected in the repeater or if the repeater is empty. I have tried using a Validator or expression that looks if one of the properties for the infotable selected rows is null, undefined, "" or unknown but nothing give the correct result.


What is the correct way to check this?


Thnx

1 reply

5-Regular Member
October 24, 2016

Hi Steven,

You can check within the Service itself if the Infotable is empty and can set the Disabled (Boolean base type) during the runtime.

Are you checking for some of the columns in InfoTable or for no value at all in the Infotable i.e. no rows? You can also check this using the getRowCount() (note this will not work with JSON objects)

Hope this helps.

1-Visitor
October 24, 2016

I have found that it seems to be that the variable from the infotable seems to go in an unknown state or something depending on the action perfomed. If you show the value from the infotable in a label it is empty but for the expression or validator it doesn't seem to be empty. I have found a solution to put the value from the infotable in a textbox (and hide it) and then use this value in my expression and that way it is always has same state namely empty when it needs to be.