# Cannot assign value to type \[JbZa\] error

**URL:** <https://community.linx.software/community/t/cannot-assign-value-to-type-jbza-error/675>\
**Category:** Support\
**Created:** [November 24, 2023, 8:25am UTC](https://community.linx.software/community/t/cannot-assign-value-to-type-jbza-error/675 "2023-11-24T08:25:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Majid](https://community.linx.software/community/letter_avatar_proxy/v4/letter/m/13edae/32.png) [@Majid](https://community.linx.software/community/u/Majid)\
**Post date:** [November 24, 2023, 8:25am UTC](https://community.linx.software/community/t/cannot-assign-value-to-type-jbza-error/675/1 "2023-11-24T08:25:28Z")

</div>

I tried to assign a [165 mg/ml] value to a list type but got this error, does anyone come across this issue before?  
—\> System.Exception: Cannot assign value [165 mg/ml] to type [JbZa]

---

<div class="post-metadata">

**Author:** ![Dawie\_Botes](https://community.linx.software/community/user_avatar/community.linx.software/dawie_botes/32/288_2.png) [@Dawie\_Botes](https://community.linx.software/community/u/Dawie_Botes)\
**Post date:** [November 24, 2023, 9:00am UTC](https://community.linx.software/community/t/cannot-assign-value-to-type-jbza-error/675/2 "2023-11-24T09:00:07Z")

</div>

Hi Majib,

Out of the description, I’m going to assume the value is a string value, the list is a list, and you included the brackets to make the value a list?

In that case, if you look at JSON structures, the assignment would need to have the value in “” quotes:

[“165 mg/ml”]

This will give a List, with a single item in the list.

If you have multiple items, it would look like this:

[“165 mg/ml”,“150 mg/ml”,“172 mg/ml”]

Best regards,  
Dawie

---

<div class="post-metadata">

**Author:** ![Majid](https://community.linx.software/community/letter_avatar_proxy/v4/letter/m/13edae/32.png) [@Majid](https://community.linx.software/community/u/Majid)\
**Post date:** [November 24, 2023, 9:39am UTC](https://community.linx.software/community/t/cannot-assign-value-to-type-jbza-error/675/3 "2023-11-24T09:39:32Z")

</div>

Hi Dawie,

Thanks for the reply,

Actually, I am trying to pass the value from json file into the list.  
The json file is like below and has 2 keys for “generic” and “itemstrength” and the value for generic passes without issue.

“level2”: {  
“pharmaceuticalDosageForm”: “Syrup”,  
“primaryUnitOfMeasure”: “EA”,  
“itemstrengths”: [  
{  
“generic”: “Trimethoprim”,  
“itemstrength”: “165 mg/ml”  
},  
{  
“generic”: “Sulfamethoxazole”,  
“itemstrength”: “80 mg/ml”  
}  
],

the error is:  
_For Each\_Product.Loop.ForEach\_itemstrengths.Loop.AddToList\_Strength: Cannot assign value [165 mg/ml] to type [JbZa]_

- —\> System.Exception: Cannot assign value [165 mg/ml] to type [JbZa]\*

---

<div class="post-metadata">

**Author:** ![Dawie\_Botes](https://community.linx.software/community/user_avatar/community.linx.software/dawie_botes/32/288_2.png) [@Dawie\_Botes](https://community.linx.software/community/u/Dawie_Botes)\
**Post date:** [November 24, 2023, 11:03am UTC](https://community.linx.software/community/t/cannot-assign-value-to-type-jbza-error/675/4 "2023-11-24T11:03:02Z")

</div>

Hi Majid,

That probably means you Type has not been set up correctly. Can you send me a screenshot of your type, and also how to assign the AddToList. If you can’t post a screenshot here, please send to support@linx.software.

Best regards,  
Dawie
