Hi everyone! I am using openmrs 2.2.1 with xform 4.3.14. My forms submitted successfuly when I select some providers and failed when I select other providers. I am getting an error “column ‘provider_id’ cannot be null”. How do I fix this? provider failed submit - Pastebin.com
Because those providers no longer exist in the database.
They don’t exist on which table because when I look at provider’s list on openmrs Administration I can see them and also I can see them on provider table in mysql?
Can you save the xform and share it via pastebin.com?
counselling xform - Pastebin.com. But it happens to more than one form for specific providers.
I mean save as PurcForm.
I did not get you? Did you want me save the form after filling the data like this? counselling form - Pastebin.com
Under the file menu you will see the option.
Here it is. counselling xform1 - Pastebin.com
Can you cross check with this <xf:select1 bind="encounter.provider_id"> <xf:label>PROVIDER ID</xf:l - Pastebin.com and confirm that those providers exist in your database table and have a provider_id that matches the value in that xml?
They are different but for some users the form submit successfully. The provider with given name “Emanuel” with provider_id 84 on database and his id is 197 in xml form does not submit. But user with provider_id 67 on the database and 180 on xml but can submit the form successfully.
- This one can submit successfully <xf:item id=“180”> xf:labelLulu Wilson Ismael [180]</xf:label> xf:value180</xf:value>
2.This one cannot submit <xf:item id=“197”> xf:labelEmanuel Ally Nyenza [197]</xf:label> xf:value197</xf:value>
On the database i have the last provider_id 87.
While on the form designer, go to the Form Fields
panel on the left hand side, right click on Provider
and select Delete
. Then save and close the form designer. Open it again and under the Form Fields panel on the left hand side, right click and select Refresh
. Save and test form submission again.
Thank you I have tried it and the form submit successfully.