Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

AEM (Adobe Experience Manager)'s Client Context's Type Casting issue of the property

Avatar

Level 1

You can see my isssue here on StackOverFlow: http://stackoverflow.com/questions/29314851/aem-adobe-experience-managers-client-contexts-type-casti...

Let me explain here as well:

Using AEM (Adobe Experience Manager) 6.0 version, have set the Client Context's property name: 'fbage' into the 'profile' store.

And using the following JS snippet to set the value of the above property into the 'profile' store of the Client Context:

CQ_Analytics.ClientContextUtils.onStoreRegistered("profile", listenOnonStoreRegistered()); listenOnonStoreRegistered: function() { var profilestore = CQ_Analytics.ClientContextMgr.getRegisteredStore("profile"); profilestore.setProperty("fbage",35); }, ...

You can see into the following image, that the JS is successfully setting up the number or integer value into the Client Context's profile store: 

[img]aem issue 2.jpg[/img]

When I create Segmentation by using the 'profile' store and its property name: 'fbage' and try to associate the 'Operator' then where the trouble starts: The integer/number is setup at JS level is type cast into the string, when I try to use the operator 'contains' (as you can see into the below image) [which is string specific] - the Segmentation resolve fine as its turns into green.

But when I try with the Integer or number associated operators like: 'equals', 'is greater than', 'is equal to or greater than', 'is less than', 'is equal to or less than', 'is not equal to', the segment didn't resolved and based on this segment the personalized content didn't displayed or appear to the end user. 

[img]aem issue.jpg[/img]

Any idea to overcome this issue or alternative way, will be appreciated.

0 Replies