-
1. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Anisha Jhamb Sep 13, 2018 11:33 AM (in response to Manuel Ramos)1 of 1 people found this helpfulIs this field [Case Distributions, Backlog & Closures Picker] in string or integer format?
-
2. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Deepak RaiSep 13, 2018 11:34 AM (in response to Manuel Ramos)
1 of 1 people found this helpfulYou are Trying To say That if Whatever in yellow is 1, 2 or 3 then do that. If Highlighted value Returns String How you will Compare unless you have the Values 1,2,3 as String there.
-
3. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Anisha Jhamb Sep 13, 2018 11:38 AM (in response to Manuel Ramos)1 of 1 people found this helpful -
4. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Deepak RaiSep 13, 2018 11:40 AM (in response to Anisha Jhamb)
Anisha..Is this calculation Returning you values?
-
5. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Anisha Jhamb Sep 13, 2018 11:56 AM (in response to Deepak Rai)1 of 1 people found this helpfulIt will return values, if the value in field matches with the value preceding WHEN keyword. In my case, Order ID has alphanumeric values, hence, it will not give output because the WHEN clause has numbers.
I agree with you that in Manuel's scenario, the values in the field [Case Distributions, Backlog & Closures Picker] must be 1,2,3 (defined in WHEN clause) even if the format is string. And, INT([Case Distributions, Backlog & Closures Picker]) can be used to align the data types.
-
6. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Manuel Ramos Sep 13, 2018 12:54 PM (in response to Anisha Jhamb)Hi Anisha,
In response to ...
Q: "Is this field [Case Distributions, Backlog & Closures Picker] in string or integer format?"
A: this field [Case Distributions, Backlog & Closures Picker] is a String List Parameter. So this calculation contains [Case Distributions, Backlog & Closures Picker] parameter.
After you asked me about Data Type of the Parameter field, I quickly realized that I had entered my Parameter Values as string names (such as Assigned to CSR Today GMT, etc.) in the "List of Values" field. I should have entered integer Values 1, 2, 3 as I had referred these Values in my Calculation by integer instead of by string names (such as Assigned to CSR Today GMT, etc.).
Because of this error the calculation did not recognize integer Values in the Parameter because the Parameter referred to the Values by string names (such as Assigned to CSR Today GMT, etc.) instead of integer Values.
This question helped me understand that the issue with the calc field was in the Data Type as well as List of Values selections I made while creating the Parameter.
Thank you so much for your help with this an my other question!
Manuel
-
7. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Manuel Ramos Sep 13, 2018 1:15 PM (in response to Deepak Rai)Hi Deepak ... correct, trying to say that if whatever is in yellow (the Parameter) 1, 2 or 3 then execute that that calculation.
Initial error message was: Expected type string, found integer. Comparison in 'CASE' expression must be string type. Even though my 'CASE' expression Parameter [Case Distributions, Backlog & Closures Picker] was already a String, I ended up changing the Parameter Data Type from String to Integer as well as changing Values (such as Assigned to CSR Today GMT, etc.) to 1,2,3 and the Calculation is now valid.
FROM:
TO:
Thank you so much for your help with this question!
-
8. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Anisha Jhamb Sep 13, 2018 1:35 PM (in response to Manuel Ramos)Please consider marking the replies as Correct/Helpful as appropriate on the discussions. This helps anyone who may be looking for a solution to a similar problem.
Thanks!
-
9. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Deepak RaiSep 13, 2018 1:36 PM (in response to Manuel Ramos)
Good, It Worked for you and That's the way it was expected to work. You may Close Thread if you got what was needed.
Thanks
Deepak
-
10. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Manuel Ramos Sep 13, 2018 3:30 PM (in response to Anisha Jhamb)Hi Anisha ... Thanks for recreated the scenario with SuperStore.
Even though my 'CASE' expression Parameter was already a String Data type (as you can see from the Parameter print screen below) I converted the 'CASE' expression Parameter in the Calc Field using INT() and the calculation is now valid.
CASE INT([Case Distributions, Backlog or Closures Picker])
However not sure I understand the error message which stated, "Expected type string, found integer. Comparison 'CASE' expression must be a string type." I created the Parameter as a string, which is what was expected according to the error msg. But then in the Calc Field I converted the 'CASE' expression to INT: CASE INT([Case Distributions, Backlog or Closures Picker]) which doesn't make scene to me since the Parameter used in the 'CASE' expression was created as a String to begin with. Why does it need to be converted to INT in the Calc Field when according to the error message the expected type is string and that is what was created? Any guidance with this part of the question would be greatly appreciated. Thank you.
Converted 'CASE' expression to INT below and the Calc is now valid, even though the error message stated that the expected type is string and that is what was created?
CASE INT([Case Distributions, Backlog or Closures Picker])
-
12. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Manuel Ramos Sep 13, 2018 4:18 PM (in response to Deepak Rai)Thanks again Deepak!
-
13. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Deepak RaiSep 13, 2018 4:21 PM (in response to Manuel Ramos)
You are Welcome!!! One Suggestion though, you struggled all day for this. This could have been Solved much earlier with a packaged workbook with fake data set.
Thanks
Deepak
-
14. Re: Expected type string, found integer. Comparison in 'CASE' expression must be string type.
Manuel Ramos Sep 13, 2018 4:39 PM (in response to Deepak Rai)Oh I see, got it. Thanks again for all the valuable tips and info. -Manuel