[Solved] Privacy and hidden data

I want my user to be able to see information about their wallet, but not anyone else.

I have set it so that when This Wallet’s Creator is Current User, they can view all fields, while all boxes are unchecked for everyone else

Even so, when I create a new user and try to show the wallet transactions and balance, nothing shows and the inspector says that it is empty.

How do I maintain security while showing the user their wallet data?

image

Thanks

Are you sure the current User has a wallet?

1 Like

I think so…


I’m not sure how that screenshot relates to anything…

According to your debugger the current User’s wallet is empty - that means the current User doesn’t have a Wallet.

That’s almost certainly what the issue is here.

Have you checked in your User database to confirm that the User in question definitely has a wallet?

1 Like

Ah, so in the data type Wallet, the user has a wallet, but in the data type User, they do not…

I am not sure I understand how one thing can happen without the other…

Ah, so in the data type Wallet , the user has a wallet, but in the data type User , they do not…

I think you’re getting things mixed up here…

From you screenshots, the Wallet definitely has a User, but from your debugger screenshot the User doesn’t have a wallet.

And your expression is calling the Current User’s Wallet - hence why it’s empty.

So either change your expression (although I wouldn’t recommend that) or fix your workflows to ensure you’re setting the Wallet field on the User correctly

I am not sure I understand how one thing can happen without the other…

Nothing will happen unless you programme it to happen - so whatever is happening is exactly what you’ve set up to happen.

1 Like

I would like the user to have a wallet automatically - they have a wallet field, type wallet. Ideally I would like to set their balance when they sign up, but I can’t see how that can be done…

Just create a new Wallet every time a new User signs up and add it to the User’s Wallet field.

2 Likes

So I have set it up to create a new wallet every time a new user signs up, but while in the wallet type the user has a wallet, in the user type, they still don’t…

How do I add their wallet to their wallet field? Surely adding them a wallet should do that?

while in the wallet type the user has a wallet

No… the User does NOT have a wallet… the Wallet has a User (owner). That’s not at all the same thing.

How do I add their wallet to their wallet field?

Set the Wallet field on the User datatype to the newly created Wallet

Surely adding them a wallet should do that?

I’m not sure what you mean by ‘adding them a wallet’…

But if you mean creating a wallet and setting the current User as the wallet’s Owner, then no… why would that do anything to the current User? (answer: it doesn’t).

If you mean setting the Wallet to the Wallet field on the User datatype then, yes - that’s exactly what you need to do, but you haven’t done that yet.

1 Like

Ok, so when they click Sign up, it creates a new wallet

image

then the wallet is set to current user’s wallet

But it’s still not working…

I even changed that to reflec the result of step 1, still no wallet…

What you’re doing makes no sense (think about it)…

you’re setting the current user's wallet to the current user's wallet. But at no point have you ever set a wallet as the current user's wallet… so you’re just setting it to be empty.

You need to set the new User’s Wallet to be the newly created Wallet (result of step 1)

1 Like

Thanks so much Adam. Complicated stuff this!!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.