Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ivandrago
Creator II
Creator II

Activate Button based on selection

Hi,

I have the attached Document, within there, there is a Button on the "Main" Sheet called Go to Sheet and when you click on it, it will go to the Sheet "Active Sheet".

I only want this button to be enabled if the field OriginalTable has been selected and has a value AND the field _AreaFlag is greater than 0 (Zero)

I have tried the following confition but it is not working

=Len(Trim(GetCurrentSelections(OriginalTable))) > 0 and _AreaFlag > 0

Thanks

6 Replies
bc-thebruuu
Creator
Creator

Pls try the following condition:

Count(DISTINCT{<OriginalTable=p(OriginalTable),_AreaFlag={">0"}*p(_AreaFlag)>}Area)>0

and GetSelectedCount(OriginalTable)>0

Anonymous
Not applicable

Hello Ivan,

You can try this:

=(Len(Trim(GetFieldSelections(OriginalTable))) > 0) and (_AreaFlag > 0)

Best regards,

Marco

ivandrago
Creator II
Creator II
Author

Hi, can this be done without the field "Area" in the formula?

bc-thebruuu
Creator
Creator

You can count whatever is needed .. .the advantage of selecting Area is that with the distinct you'll get 0 or 1, according to data provided

ivandrago
Creator II
Creator II
Author

So what would the formula be if lets say the field Area was not on the table and only had four fields left.

bc-thebruuu
Creator
Creator

As long as Area is on the script, it doesn't matter if you show it or not.

But let's suppose that you don't have it ... you could even use OriginalTable in this way:

Count(DISTINCT{<OriginalTable=p(OriginalTable),_AreaFlag={">0"}*p(_AreaFlag)>}OriginalTable)>0

and GetSelectedCount(OriginalTable)>0