Forum Academy Marketplace Showcase Pricing Features

Complete value of search box using value from picture

Hi fiends!

I am building an app where you can input a value using a search box (‘Selecteer medicatie’ on the picture). Alternatively, you can take a picture (‘Neem Foto’ in my native language). This picture then will use Text recognition to get a text-string. If the user of my app chooses to take a picture, I would like to update the value of the search box with this text string.

I am trying to do this using the ‘make change to thing…’ function, but it does not work

Basically, nothing happens when I click the button, the app just freezes. I am not sure if that is because my work flow is wrong or if the app just take a very long time to execute work flow.

Has some of you an idea of how to solve this?

thx a lot!
Thomas

Ah well that won’t work because that value is empty and you’re trying to change a field on something that’s empty (probably some internal error)

What you should do instead is put that text result in a state set state (i usually just use the page itself, the top level element for state).

Then just use the Default value field on the searchbox element and reference this state with something like mypage's fotoresultaat.

Hi Kayami, many many thanks for your answer, highly appreciated.

I think what you suggest is a great idea, however, I didn’t manage to fully implement it.

I created the custom state:

Then I also used the ‘set state’ workflow:

But then the custom state option on not showing up in my search box when I want to put it as ‘Default Value’.

I tried by creating both a custom state for the page level (~‘grand parent group’) and for the direct group (= parent group). Any idea what is going wrong?

Thanks a lot, Thomas

Hey @thomas.bol

The problem is in that last image, selecting the state.
In bubble it doesn’t really matter where you put the state, it’s always accessible from any element.

Instead of Parent group's medicatie clear it out and try something like 2_medicatie_toevoegen's FotoUpload_Medication

Works now!! Super, thanks a ton Kayami, your input was very helpful.

1 Like