How do we handle datatype: None in the HTML Form Entry

Hi folks, am dealing with some forms and I have some concepts with Datatype : None … however going through HTML Form Entry Module Reference - Documentation - OpenMRS Wiki this seems not facilitated … recieving the above

java.lang.RuntimeException: Cannot handle datatype: N/A (for concept 167528)

cc @dkayiwa @ibacher

It means that this concept cannot be used as a question which expects answers. But it can be an answer to a question.

2 Likes

Thanks @dkayiwa this really makes sense :heart_eyes:

Hello @dkayiwa would also want to ask this…

Got a scenerio that I have a concept am using though when I render the form it throws a NullPointer Exception yet I thought if a concept is not found it should throw something like cannot find concept of datatype = ' ' so in wat cases do we get NullPointer Exception

A stack trace would greatly help.

yes @dkayiwa here is the error ---- java.lang.NullPointerException at org.openmrs.module.htmlformentry.ObsGroupCom - Pastebin.com also am trying to use this concept in a table all wrapped under an <obsgroup> tag

Hello, try to cross check and see that all variables or form input datatype. This error occurs when you use a datatype that is not known to OpenMRS e.g. you used datatype “none” or you did not define the datatype which is not among the listed below;

Numeric - Stores numeric values (integer or decimal).

Coded - Represents a concept that has a predefined set of options or answers. Coded with a list - Similar to Coded datatype, but with a specific list of options. Coded with a set - Similar to Coded datatype, but with a set of options.

Text - Stores text data. Text area - Allows multi-line text entry.

Date/Time - Stores both date and time values. Date - Stores date values. Time - Stores time values.

Boolean - Represents true or false values.

Structured Numeric - Stores a numeric value with units and references.

Complex - Used for storing complex data like images or files.

Check if your variables or form inputs are set to any of the above datatype. NOTE: replace any datatype which doesn’t match any of the above

1 Like

Datatype “None” :thinking:

I dont think it exists, however it might be one way to tell you that you forgot to assign a datatype to a form input or you assigned a none recognised datatype