I cant add a data value to a listing

so when im trying to make a listing feature on my site, the data fields are
Pet (Another data item)
Price gems (number)
Price Cash (Number)

when i attempt to create a listing page where you can view listings (works fine) and create listings by entering your Pet #, when I try to add the data for “Pet” it says this


how do i make it add it?

Hi there, @evan2838383… the issue is a type mismatch between your pet field (which links to another data type) and the input element (which has a content format of text). If you want to save something to the pet field, you have to save a thing from the data type to which the field is linked. So, if you need to stick with the input element where a user can enter a pet number, then you would need to do something like pet = Search for Linked Data Type:first item with a constraint on the search where the pet number of a thing in the linked data type equals the input element’s value.

Hope this helps.

Best…
Mike

sorry but im having a hard time understanding, can you walk through how i fix it,
but thanks for the fast reply

I thought I just did walk you through it. :slight_smile:

Did you even try what I suggested?

i dont see a “search for linked data” area, sorry for any inconvenience

Select Do a search for… and then select the data type to which the pet field is linked (Linked Data Type was just an example because I don’t know what you called the other data type… although, I’m guessing it’s Pet).

i still dont understand or see the pet area here

Get rid of :item # and select :first item instead. Then, click on Search for pets and add a constraint that will be something like pet id = Input Pet ID's value (where pet id is whatever you called that field in the pet data type).

still broken

The issue checker is telling you what the problem is. Your # field has a field type of number, so change the content format of the Input Pet ID element to integer, and you should be good to go. If a pet id really isn’t a number, then leave the input element as text and then delete the # field and add a new field with a field type of text.

Also, just some friendly advice here… I don’t know how new you are to Bubble, but you seem to be struggling with some of the basic concepts. If you haven’t worked through Bubble’s tutorials, I suggest taking a step back and doing that because without a solid understanding of the basics, it can be quite challenging to get up the Bubble learning curve.

thank you its valid but in the listing all data for pet is blank except the price data that is seprate



(value2 is a number value)

I’m not exactly sure what you mean by that. Are you saying the pet field on the listing you are creating is not getting a value? If so, that could be happening for lots of reasons, and it’s impossible for me to help without knowing what’s going on under the hood. If you want to share a read-only link to your editor, I’m sure we can figure out what’s going on.

where do i find/get a read only link?
also yes the pet field in the data tab for listings is blank

Go to Settings >> General, change Application rights to Everyone can view, and then copy the URL to the page in the editor where this functionality exists and paste the link here.

its the “sell” buttons code https://bubble.io/page?version=test&type=page&name=trading&id=e-dev-hub&tab=tabs-1

I have no idea why, but for some reason, you are using a custom state in the constraint on your search for pets. Try getting rid of value2, and just select Input Pet ID after the equals sign. So, it will end up looking like # = Input Pet ID's value.

invalid

ohhhh i see. the input needs to be set as “integer” let me test that

Works!!! thanks for the help!

1 Like