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

Enable Contact Tab When NextArrow Icon on Item is Selected

Hello,

I have a single form on a Gallery with three tabs; the data source is a SharePoint list. Each tab contains the contact information for three entities, my company, a contractor and a vendor. Each tab is a button with the OnSelect property set as follows:

btnDSIContact > OnSelect = Set(varContact, "DSI");
btnGCContact > OnSelect = Set(varContact, "Contractor"); and
btnVenContact > OnSelect = Set(varContact, "Vendor")

 

I would like the 'NextArrow' icon in the Gallery to navigate to the corresponding tab when selected. When the 'NextArrow' is clicked, the selected item should enable the tab related to that item. In the screenshot, when the 'NextArrow' is clicked in the 'Randy Smith' record the DSI Contacts tab should display Randy Smith's contact information. I set the 'Visible' property for each DataCard that toggles the Enabled/Disabled states.

 

DSIContactName; DSIContactTitle; DSIEmail; and DSIPhone > Visible = btnDSIContact.DisplayMode = DisplayMode.Disabled

GCContactName; GCContactTitle; GCContactEmail; GCContactPhone; GCCompany; GCAddress; GCCityStateZip > Visible = btnGCContact.DisplayMode = DisplayMode.Disabled

VendorContactName; VendorContactTitle; VendorCompany; VendorEmail; VendorPhone > Visible = btnVenContact.DisplayMode = DisplayMode.Disabled

 

ContactForm6.png

 

I'm not sure how to tie this all together to enable the tabs when an item is selected, if I'm missing something or, if this is possible.

Thank you for any assistance!
Patti Love

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @PVLove ,

Do you mean that:

1)you have three groups fields: DSIContactName,DSIContactTitle,DSIEmail ;GCContactTitle,GCContactEmail ;VendorContactName,VendorContactTitle,VendorEmail?

2)you want to justify which group display in the selected item and then make the related tab disabled?

Could you tell me whether fields in one group will have value at the same time?

For example: 

if Title1 display DSIContactName, then Subtitle1 will display DSIContactTitle and Body1 will display DSIEmail.

 

If yes, you just need to justify whether is blank in DSIContactName , GCContactTitle or VendorContactName.

You could set like this:
btnDSIContact.DisplayMode:

 

If(!IsBlank(ContactsGallery.Selected.DSIContactName),Disabled,Edit)

 

btnGCContact.DisplayMode:

 

If(!IsBlank(ContactsGallery.Selected.GCContactTitle),Disabled,Edit)

 

btnVenContact.DisplayMode:

 

If(!IsBlank(ContactsGallery.Selected.VendorContactName),Disabled,Edit)

 

 

If no, then need to justify whether is blank in DSIContactName&&DSIContactTitle&&DSIEmail ;GCContactTitle&&GCContactEmail ;VendorContactName&&VendorContactTitle&&VendorEmail.

You could set like this:
btnDSIContact.DisplayMode:

 

 

If(!IsBlank(ContactsGallery.Selected.DSIContactName)&&!IsBlank(ContactsGallery.Selected.DSIEmail)&&!IsBlank(ContactsGallery.Selected.DSIContactTitle),
Disabled,Edit)

 

 

btnGCContact.DisplayMode:

 

 

If(!IsBlank(ContactsGallery.Selected.GCContactTitle)&&!IsBlank(ContactsGallery.Selected.GCContactEmail),Disabled,Edit)

 

 

btnVenContact.DisplayMode:

 

 

If(!IsBlank(ContactsGallery.Selected.VendorContactName)&&!IsBlank(ContactsGallery.Selected.VendorContactTitle)&&!IsBlank(ContactsGallery.Selected.VendorEmail),Disabled,Edit)

 

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support
Community Support

Hi @PVLove ,

Do you want to change tabs' mode based on the selected item in the gallery?
You could set the tab's DisplayMode based on the selected item.

Could you tell me:
1)the data type for the field 'Randy Smith'?

2)whether is one selected record in the gallery related to one tab?

I assume that the field is text type and one item related to one tab.

Then you could set DSI Contacts tab 's DisplayMode :

Gallery1.Selected.usernamefield="Randy Smith"

set btnGCContact 's DisplayMode :

Gallery1.Selected.usernamefield="Tyler Hiney"

 set  btnVenContact 's DisplayMode :

Gallery1.Selected.usernamefield="John Smith"

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi v-yutilu-msft,

Thank you for responding! The data type for the 'Randy Smith' field is the ContactsGallery > Title1 field; the ContactsGallery > Subtitle 1 field is the Contact's 'title'; and the ContactsGallery > Body 1 field is the Contact's 'email.'

 

ContactForm7.png

 

The text field for each is set as follows.

ContactsGallery > Title1 > Text > Coalesce(ThisItem.GCContactName,Concat(ThisItem.DSIContactName,DisplayName,";"),Concatenate(ThisItem.VendorContactName,""))

ContactsGallery > Subtitle1 > Text > Coalesce(ThisItem.DSIContactTitle.Value,ThisItem.GCContactTitle.Value,ThisItem.VendorContactTitle)

ContactsGallery > Body1 > Text > Coalesce(ThisItem.DSIEmail,ThisItem.GCContactEmail,ThisItem.VendorEmail)

 

I used the Coalesce function on each Text property to display the contact information on each tab. This form will be used in the future to add contact information for 50-100 contacts for a jobsite. Changing the DisplayMode for each 'Text' property does not enable the corresponding Tab when the 'NextArrow' is selected.

 

Thanks!

Patti

Hi @PVLove ,

Do you mean that:

1)you have three groups fields: DSIContactName,DSIContactTitle,DSIEmail ;GCContactTitle,GCContactEmail ;VendorContactName,VendorContactTitle,VendorEmail?

2)you want to justify which group display in the selected item and then make the related tab disabled?

Could you tell me whether fields in one group will have value at the same time?

For example: 

if Title1 display DSIContactName, then Subtitle1 will display DSIContactTitle and Body1 will display DSIEmail.

 

If yes, you just need to justify whether is blank in DSIContactName , GCContactTitle or VendorContactName.

You could set like this:
btnDSIContact.DisplayMode:

 

If(!IsBlank(ContactsGallery.Selected.DSIContactName),Disabled,Edit)

 

btnGCContact.DisplayMode:

 

If(!IsBlank(ContactsGallery.Selected.GCContactTitle),Disabled,Edit)

 

btnVenContact.DisplayMode:

 

If(!IsBlank(ContactsGallery.Selected.VendorContactName),Disabled,Edit)

 

 

If no, then need to justify whether is blank in DSIContactName&&DSIContactTitle&&DSIEmail ;GCContactTitle&&GCContactEmail ;VendorContactName&&VendorContactTitle&&VendorEmail.

You could set like this:
btnDSIContact.DisplayMode:

 

 

If(!IsBlank(ContactsGallery.Selected.DSIContactName)&&!IsBlank(ContactsGallery.Selected.DSIEmail)&&!IsBlank(ContactsGallery.Selected.DSIContactTitle),
Disabled,Edit)

 

 

btnGCContact.DisplayMode:

 

 

If(!IsBlank(ContactsGallery.Selected.GCContactTitle)&&!IsBlank(ContactsGallery.Selected.GCContactEmail),Disabled,Edit)

 

 

btnVenContact.DisplayMode:

 

 

If(!IsBlank(ContactsGallery.Selected.VendorContactName)&&!IsBlank(ContactsGallery.Selected.VendorContactTitle)&&!IsBlank(ContactsGallery.Selected.VendorEmail),Disabled,Edit)

 

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-yutliu-msft 

 

Thank you so very much.  The second option is exactly what I needed. 

 

btnDSIContact > DisplayMode =
If(!IsBlank(ContactsGallery.Selected.DSIContactName)&&!IsBlank(ContactsGallery.Selected.DSIEmail)&&!IsBlank(ContactsGallery.Selected.DSIContactTitle),Disabled,Edit)


btnGCContact > DisplayMode =
If(!IsBlank(ContactsGallery.Selected.GCContactName)&&!IsBlank(ContactsGallery.Selected.GCContactEmail),Disabled,Edit)


btnVenContact > DisplayMode =
If(!IsBlank(ContactsGallery.Selected.VendorContactName)&&!IsBlank(ContactsGallery.Selected.VendorContactTitle)&&!IsBlank(ContactsGallery.Selected.VendorEmail),Disabled,Edit)

 

 

Patti

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,425)