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

Why does this string not work?!?!?!

Product_Type__c-={'LearningSpace Enterprise', 'LearningSpace Pro', 'Replay', 'Replay One', 'METIVision', 'N/A', 'LearningSpace One', 'LearningSpace', 'UltraPortable Replay', 'Replay Connect + Replay One', 'LearningSpace Go', 'LearningSpace One VHA', 'Meti-FX', 'LS Connect + LS One'}>}Status)

9 Replies
rubenmarin

Hi Dan, did you tried? Syntax checker will mark as an error after the '-=' but it works.

Also, the field name has a double underscore ( _ ) between 'Type' and 'c'?

sunny_talwar

May be you need a function to begin with?

Concat({<Product_Type__c-={'LearningSpace Enterprise', 'LearningSpace Pro', 'Replay', 'Replay One', 'METIVision', 'N/A', 'LearningSpace One', 'LearningSpace', 'UltraPortable Replay', 'Replay Connect + Replay One', 'LearningSpace Go', 'LearningSpace One VHA', 'Meti-FX', 'LS Connect + LS One'}>}Status)

Not applicable
Author

The double underscore is correct, and the code checks OK but it does not actually perform the request, anything after the first product type does not effect the calculation, and i have verified that that product types contain data.

rubenmarin

Hi Dan, not sure, I don't see any problem in the string. I did something similar with a larger string and worked... maybe in the rest of the expression?

Note that you're doing a '-=', so it have to count all types except the ones you are writing.

Not applicable
Author

it does not like that either

Not applicable
Author

Count({$<Region__c={'United States'},createdquarter={'4/1/2016'},Return_Visit__c={'yes'},

Product_Type__c-={'LearningSpace Enterprise', 'LearningSpace Pro', 'Replay', 'Replay One', 'METIVision', 'N/A', 'LearningSpace One', 'LearningSpace', 'UltraPortable Replay', 'Replay Connect + Replay One', 'LearningSpace Go', 'LearningSpace One VHA', 'Meti-FX', 'LS Connect + LS One'}>}Status)

I am trying to count everything except these products, so the -= is correct, it will disregard the first product in the string just not the following ones.

sunny_talwar

Have tried adding Product_Type__c as dimension and you happen to see all other Product_Type__c which you have tried to exclude?

Would you be able to share a sample?

Not applicable
Author

I was able to get the code to work but not by modifying code, I ran both halves of the expression individually then joined them and it worked. The expression is the same except one variable in the first half, i am basically counting with and with out the variable and then dividing to get  a percentage.

Count({$<Region__c={'United States'},createdquarter={'4/1/2016'},Return_Visit__c={yes},

Product_Type__c-={'LearningSpace Enterprise', 'LearningSpace Pro', 'Replay', 'Replay One', 'METIVision', 'N/A', 'LearningSpace One', 'LearningSpace', 'UltraPortable Replay', 'Replay Connect + Replay One', 'LearningSpace Go', 'LearningSpace One VHA', 'Meti-FX', 'LS Connect + LS One'}>}Status)

/

Count({$<Region__c={'United States'},createdquarter={'4/1/2016'},

Product_Type__c-={'LearningSpace Enterprise', 'LearningSpace Pro', 'Replay', 'Replay One', 'METIVision', 'N/A', 'LearningSpace One', 'LearningSpace', 'UltraPortable Replay', 'Replay Connect + Replay One', 'LearningSpace Go', 'LearningSpace One VHA', 'Meti-FX', 'LS Connect + LS One'}>}Status)

sunny_talwar

I think you should create a flag in the script and then use that in your set analysis statement

LOAD Product_Type__c,

          If(Match(Product_Type__c, 'LearningSpace Enterprise', 'LearningSpace Pro', 'Replay', 'Replay One', 'METIVision', 'N/A', 'LearningSpace One', 'LearningSpace', 'UltraPortable Replay', 'Replay Connect + Replay One', 'LearningSpace Go', 'LearningSpace One VHA', 'Meti-FX', 'LS Connect + LS One'), 0, 1) as Flag

          ....

FROM Source;

Count({$<Region__c={'United States'}, createdquarter={'4/1/2016'}, Return_Visit__c={yes}, Flag = {1}>}Status)

/

Count({$<Region__c={'United States'}, createdquarter={'4/1/2016'}, Flag = {1}>}Status)