Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Selected Count in Table or Multibox

Hi,

Is there is any way, by which we can get whether any value has been selected in Multibox or any field of a table.

Regards,

MK

7 Replies
sunny_talwar

Not entirely sure I understand your requirement, but to see what is being selected you can use Current Selection Object.

Capture.PNG

ashfaq_haseeb
Champion III
Champion III

Hi,

Did you try current selection box?

Regards

ASHFAQ

Kushal_Chawda

Create a text object and use below fucntion

=GetCurrentSelections()

tresesco
MVP
MVP

If you want to check if selected or not (perhaps for conditional use), try GetSelectedCount(), like:

=GetSelectedCount(FieldName)>0      // works even without '>0'

It will return True (-1) if selected, else, False(0)

vardhancse
Specialist III
Specialist III

in list box ->Properties->General->Show Frequency(Enable the option)

By default it will show number of times it was repeated

Anonymous
Not applicable
Author

Thanks for the replies.

I want to check, selection of any field in the multibox using set analysis.

Say I have a multibox with 10 fields, one will be selected.

All other 9 fields are from one table say T1. Now, I want show one object, only if there is no value selected in the 9 fields.

I have already tried this, but there are more number of if-else statement along with "and" cluase, which hampers performance.

Please assist.

Regards,

MK

tresesco
MVP
MVP

l guess you are coming from the idea- 'IF is bad for performance and set analysis should be used in place of that'. But you have to realize one thing that - 'set analysis is not a replacement of if statement'. There are situations when set analysis can't be used but if. Here you are trying to hide an object and believe me, using if would not affect performance that badly. In fact, using if clause is ideal here. try conditional expression like:

=Not (GetSelectedCount(Field1) or  GetSelectedCount(Field2) or ...or GetSelectedCount(Field9) )

Edit: Don't get confused with - there is no IF in the expression, the expression is a logical one and would get evaluated like an if statement and return true/false.