Liquid error: Unable to cast object of type 'System.Int32' to type 'System.String' - adxstudio-portals

I am facing this error during AdxStudio in Liquid Web Templates.
Liquid error: Unable to cast object of type 'System.Int32' to type 'System.String'.
My code is follow:
<div>Posts count: {{website.forums[1].threads[0].posts.post_count}}</div>
Thanks.

Please try this:
Count Specific forum posts:
<div>Posts count: {{website.forums[1].post_count}}</div>
Count specific forum,s specific threads count:
<div>Posts count: {{website.forums[1].threads.all[0].post_count}}</div>

Related

#Multivalue aggregation error in Webi- Business Objects

I have report in below format
Hierarchy_country|Account|Year
ABC|1001|#MultiValue
To resolve #Multivalue error, I have tried below variables to resolve the error but it doesn't get fixed
1:Last(Amt)ForEach(Period)
2: Sum(Amt)ForEach(Period)
Year is dynamic - YTD/MTD/QTD

Getting an error testing Heroes tutorial code

I'm working through the generic Heroes tutorial, and have come to the section on testing. I run the basic included test and it throws an error [SEVERE] aqueduct: type 'String' is not a subtype of type 'Map<dynamic, dynamic>' in type cast Instance of 'Application<HeroesChannel>'. Suggestions are greatly appreciated.

GraphQL error: Field error: value is not an instance of Date

After I've installed redis-server and graphql-redis-subscriptions I receive the following error [GraphQL error]: Message: Field error: value is not an instance of Date, Location: [object Object], Path: messageAdded,createdAt [Error: GraphQL error: Field error: value is not an instance of Date] If I remove createdAt from query everything works fine.
scalar Date I am using in types schema

Apache Pig: ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: can't look backwards more than one token in this stream

I wrote a UDF that returns a string and here is a sample code:
split data into purchased IF ((boolean) (myudf(param)), failed OTHERWISE;
As an example, here is the example of that my udf returns:
split data into purchased IF ((boolean) (retcode == 'SUCCESS')), failed OTHERWISE;
Unfortunately. I get the following error:
Apache Pig: ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: can't look backwards more than one token in this stream
I also tried this:
split data into purchased IF ((boolean) '(retcode == 'SUCCESS')'), failed OTHERWISE;
I get this error:
2015-06-19 10:10:48,330 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 11, column 85> Syntax error, unexpected symbol at or near '250.00'
I also tried this:
split data into purchased IF ((boolean) '(retcode == \'SUCCESS\')'), failed OTHERWISE;
I don't get any error, but the I don't get the expected result back.
Any help with this would be great.
That error is thrown because ANTLR can't parse correctly that sentence. Pig should give you a different error showing what is the problem, like it generally does, but it seems the parsing rules for the SPLIT sentence don't take into account what happens when you try to cast the condition.
The problem here is solved simply by removing that cast to boolean:
split data into purchased IF (retcode == 'SUCCESS'), failed OTHERWISE;
That will work.
Why does the cast make it fail? That I don't know. I guess that casting the output of an expression counts as two different expressions, since it has to resolve the inner expression to apply the cast afterwards, and the syntax rule for the split operator does not allow this. 0% sure though.

Dynamically Compiling SilveLight 4.0 Error Type 'System.ComponentModel.Design.HelpKeyword' is not defined

When I dynamically compile SilverLight 4.0 application using Microsoft.VisualBasic.VBCodeProvider, I get the following error.
Line: 118 ErrorCode: BC30002 Error: Type 'System.ComponentModel.Design.HelpKeyword' is not defined.
Line: 130 ErrorCode: BC30002 Error: Type 'System.ComponentModel.Design.HelpKeyword' is not defined.
Line: 141 ErrorCode: BC30002 Error: Type 'System.ComponentModel.Design.HelpKeyword' is not defined.
Line: 234 ErrorCode: BC30002 Error: Type 'System.ComponentModel.Design.HelpKeyword' is not defined.
I would appreciate any help on how to resolve this.
According to MSDN, this Type is not supported in Silverlight. This means that you need to adjust your code to exclude references to this type. We regularly do this using conditional directives (#if).