Forum Academy Marketplace Showcase Pricing Features

Need Help on leading zeroes in DB

Hi experts! I have 2 database lists named MemberMaster and FundSubs. Both of them has “partscode” data field on it both formatted as text. Why is that in the Membermaster there are leading zeroes (which is the expected format) but in the FundSubs theres none. Now I’m having trouble with querying the FundSubs. Any help would be greatly appreciated. Thanks!

Really hard to give an idea of what is wrong without knowing how the FundSubs ‘partscode’ is setup in the database (as a number or a text)…sounds like it is setup to be number.

Share how things are setup as well as the workflows you use to get the data into the database.

Hi, both of them were set as text in field type. Most if not all workflows related to it is just Do a search for Fundsubs [partscode=searchbox membermaser value partscode]'contributions. And clearly, it doesnt come out since otherlist has leading zeroes and the other has none.

and by the way, both data comes from an excel upload.

I’m more curious about the way the workflows are setup to get the data into the database…not to search for it…but when you mention they come from an excel upload, does the excel sheet have leading zeroes on both?

If it does, maybe there is an issue in the excel sheet where the excel data is recognized by Bubble as a number, and when they ‘transform’ it to a text type to match with your field data type, they remove the leading zeroes.

Thats where I’m trying to figure out now if when does bubble-upload recognizes the source data as text or number when both are in .csv which does not have leading zeroes on every cells.

That would be the reason they don’t have leading zeroes in your Bubble database. If there are no leading zeroes in the excel file, I don’t see a reason why they would have leading zeroes in the Bubble database.

Unless you are saying that even the cells that do have leading zeroes in excel are not getting them in the Bubble database?

What makes me wonder why does MemberMaster db has leading zeroes on but FundSubs doesnt? when both data comes from the same formatting?

Meaning they are both created using the same excel file?

different excel file but the same format. Both partscode columns are formatted same and both file is formatted the same. Now I’m wondering what makes MemberMaster append the leading zeroes and the Fundsubs do not. The only difference on both files is that altough "partscode’ are formatted the same, MemberMaster is mostly text and FundSubs is mostly general numbers.

Test it. Use the same excel file to upload into both data types and see if there is a difference. Then test and change the format of FundSubs to be text.

I haven’t had to do this before so can’t comment on what is happening behind the scenes in Bubble, but I’d assume a quick test will help to understand the situation more.

Thanks for the help, after few upload and format changes, I found out that CSV format does not append leading zeroes but CSV UTF-8 format does. Although both file are in .csv only the UTF-8 appends leading zeroes when uploading to bubble db. While this is my case, I’m not so sure if the same could be true with the others. Thanks!

I thought I’ve seen the past Bubble recommends to use the CSV UTF-8 format, although I can’t recall where that was to reference it.

Glad you did some tests to resolve the issue.