Getting error when updating a record

darren

Member
When updating a record, after hitting submit, I get an error:
[pre]
Dropdown validation error: attempt to insert a value that is not one of the available options
[/pre]

I found the fix to the error is to reselect the selection for the select_single field that is using the ajax friendly search function.

For whatever reason when updating a record, I need to reselect the choice made in the select single ajax search enabled field every time.

Any solution to this problem?

PHP Version: 7.3.30-1+ubuntu18.04.1+deb.sury.org+1

postgres version: 12.8 (Ubuntu 12.8-1.pgdg18.04+1)

Web server: Apache/2.4.29 (Ubuntu)

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36
 

eugenio

Administrator
Staff member
The error means that the value you are passing through the form is not in the available list of option, which value was selected?

Which dadabik version are you using?
 

darren

Member
Yes I understand the error, it just doesn't make sense.

In my case i have a a record for a person named Mary

I have her address, name, contact info all filled out and successfully submitted.

This city field is and ajax-friendly search field, where the only choice allowed is from the list of pre populated options.

Now I want to go back into the record and update the phone number for example.

The record looks like this

[pre]
First: Mary

Last: XXX

Address: 123 Mockingbird Land

City: Newark <------ (an Ajax search field)

State: NY

ZIP: 00001

Phone: 123-456-7890 <---------(the field I'm updating)
[/pre]

When I go to submit the changes I receive the aforementioned error. Only when I choose the city again (meaning I search for Newark again and select it), will it successfully update

Im using Dadabik 11.0
 

eugenio

Administrator
Staff member
Hello,
I can't reproduce this behaviour. Try yourself with the demo n.3 (erp demo), choose the products table and in the form configurator change the id_company (label brand) field, setting: User-friendly searchable? YES. Now you should have a situation similar to yours: "brand" should be set as your "city" field, right? If you update a record, you don't have to set again the brand.
Can you confirm that you can't reproduce the error with the demo and that the settings are the same?

Best,
 

darren

Member
I recently (within the last day) upgraded to PostgreSQL 13 and the error hasn't happened since, I will let you know if it happens again.
 
Top