Today I spent the whole day trying to understand why bubble doesn’t allow me to pull data from the database. I created the WALLET table with the balance field and the user field. On my user’s profile page I followed the correct path to display the data, and this data is simply not displayed, for some reason I don’t know which bubble doesn’t pull the data from the table. Can someone help me?
Hi there, @azdevz… according to the first screenshot, you have a wallet field on the User data type, and that field has a field type of the Wallet data type. In order for the expression Current User's wallet's Saldo to return a value, there must be a value in the current user’s wallet field that links a user to a thing in the Wallet data type. If you are expecting the expression to return a value because of the user field on the Wallet data type, that’s not how it works. You could get there by doing a search for wallets with a constraint where the user field is the current user, but that’s probably not the way you are trying to go. Also, you probably don’t need a user field on the Wallet data type because I assume a user creates a wallet, and the built-in Created by field will tie a user to their wallet.
First, I’m not sure why your balance field would be a text field, second, I have already explained what I believe you have done wrong, and third, it is almost certainly not a bug.
I agree with Tyler and Mike. Your current user wallet is empty. You have to set the value of wallet on the user to your wallet you have created. This does not happen automatically just because you put the user in the user field on the wallet.
You are trying to get the balance of an empty wallet field.