cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JatinSaini
Helper II
Helper II

Set Visibility Conditions on Gallery Buttons (Tabs) based on other Collection

Hi Experts,

Thanks in advance for your response and support!

JatinSaini_0-1661420992506.png

I have a Form Control which has a Source- Gallery Checkbox.

I am saving the selected checkbox values in a collection(colSourceData)

 

At top of Form Control, I have a gallery with Buttons (representing tabs).

I want to make only those Tabs Visibile based the selected cehckbox and display another form control within that tab.

 

Scenario:

If Phone, Email is checked on checkbox.

Then on Phone Marking & Email Markings Tabs would be visible.

THe Other Services Tab would be visible for any on the selected checkbox.

 

PLEASE HELP

5 REPLIES 5
Gochix
Solution Sage
Solution Sage

@JatinSaini ,

On your checkbox options set the custom variable:

Phone - OnCheck property : Set(varPhone,true)

 

On your Gallery tabs Visible property : varPhone

 

Is that a solution you are looking for or you would need more advanced?
_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

Hi @Gochix 

Thanks for your ultra-quick response.

Luckily, I have found the solution for this but in a different way.

Since you had invested your time in reviewing my query, I hope your expert mind could fix my query which has arrived after the subjected solution.

 

Now, the tabs are getting visible, but in the unstructured way... (see below)

JatinSaini_0-1661437217983.png

 

Is there way that I can show the visible tabs one after another from the left?
PLEASE HELP

Hi @JatinSaini ,

 

In this case what you could do is :

based on that you Tabs gallery looks something like Table({ID:1,Label:"Phone"})

1) On App start collect in app collection for you gallery tabs 

ClearCollect(sampletabs,{ID:1,Label:"Basic Info",TabVis:true},{ID:2,Label:"Phone",TabVis:false},{ID:3,Label:"Email Markings",TabVis:false})

2) set your Tab gallery Items to :

Filter(sampletabs,TabVis)

3) OnCheck button of each of your checkboxes set:

UpdateIf(sampletabs,Label = "Phone",{TabVis:true})

4) OnUncheck goes the opposite

UpdateIf(sampletabs,Label = "Phone",{TabVis:false})

 

Hope this resolves your issue.


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

Hi @Gochix 

This technique is commendable.

But, my need is much complex (not for you.. Hehe)

So let me explain you in better way....

 

Checkboxes (In Gallery)

I have collected the checkboxes selected values in a collection (colSourceData) with below formula

OnCheck - Collect(colSourceData,ThisItem)

UnCheck - Remove(colSourceData,ThisItem)

 

Tabs (In Gallery - in form of button)

The Tabs(LABELS) which I want are - 

Basic Info (Always Visible)

Phone,Email,Chat,SSP (Visible if they are in colSourceData)

SNOW (Visible if one of the selected value in Choices Filed starts with SNOW)

Other Services (Visible for any value in colSourceData)

 

 

 

I have managed to put these conditions in TabVis column of your suggested sampleTab collection on App Start.

But the issue is that they are only working correct when the app starts not after that.

 

 

@JatinSaini ,

 

In this case it's even more simple to achieve your goal.

Add a filter to your tabs gallery as something like :

Filter(colSourceData,"ColumnForTabTitle")

Then on your OnCheck and OnUncheck property you can add the remaining filters.

To ignore Basic info checkbox this would be something like:

If(Not(ThisItem.Title = "Basic Info"),Remove(colSourceData,ThisItem))

If this still doesn't resolve the issue then consider to try my solution above as I have a similar gallery tabs on one of my projects and it works for your needs. 

 


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,824)