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

Alternate states with a common column

I have 3 tables Products ,Customer and shops

Shops table is the connecting Products and Customers in data model.I am displaying Products details in one sheet and Customer details in other sheet with alternate states enabled but I want Shop_Name column(Used as filter in both sheets) from shop table to effect both the sheets commonly .How to implement this

31 Replies
CarlosAMonroy
Creator III
Creator III

Ok, that's fair.

So, what comes to my mind is the following:

Go to Settings -> Document Properties, under Triggers tab, section Field Event Triggers, add an 'OnSelect' action.

The action should be a selection type:

Select in field = Shop_Name and Searching String = =Shop_Name.

Then create another action with the same parameters but the trick is in the Alternate State selection, by choosing Product.

Here is the Screenshot.

3-14-2017 11-13-49 AM.png

3-14-2017 11-14-25 AM.png

Now when you select a shop, will be selected on both sheets.

Thanks,

Carlos

Anonymous
Not applicable
Author

Super,It works.

The only problem I see is when I select multiple Shop_names from the filter.It is not taking any selections.I tried to use ='('&Concat(Distinct Shop_Name,'|')&')' in search string but didn't work properly

CarlosAMonroy
Creator III
Creator III

That works perfect for me. Check again the syntax and remember to use the same expression in both actions.

Thanks,

Carlos M

Anonymous
Not applicable
Author

Just set the shopnames with" like that


("Shop1"|"Shop 2")

Anonymous
Not applicable
Author

='("'&Concat(DISTINCT [Shop_Name],'"|"')&'")'

Anonymous
Not applicable
Author

or

='("'&Concat({[YOUR_ALTERNATE_STATE]} DISTINCT [Shop_Name],'"|"')&'")'

Anonymous
Not applicable
Author

Carlos/Robin

It is working fine but if there is a space in Shop Name field value,it is not picking up.Please find the attached sample.I added a shop name 'Text 1' and I am unable to select that field value

Anonymous
Not applicable
Author

have a look at my answers below...

Anonymous
Not applicable
Author

I did tried the option '("'&Concat(DISTINCT [Shop_Name],'"|"')&'")'

But when noting is selected it is by default selecting all field values in Shop_Name filter

Anonymous
Not applicable
Author

if(getselectedcount(Shop_Name)>0,

'("'&Concat(DISTINCT [Shop_Name],'"|"')&'")'

)