Displaying user specific data

I have been struggling for a few days and hoping someone can help as I can’t seem to find a definitive answer.

I have several input fields on a page that result in dollar totals in multiple places. I then have a workflow that creates a new thing as ‘Total 1’ and saves all these values. When I go to page 2 I want to display the total in an input field which I can do. What I can’t do is ensure the total being displayed is for the correct user, it’s always the ‘last item’ or ‘first item’ in the database. Can someone please tell me how to ensure the data I’m displaying is created by the same user that created it on the previous page and it’s not just the last item created (which may be a different user). I have tried page parameters, saving an additional field as ‘current user’ etc but whatever way I try I can’t seem to get it right when it comes to displaying the data on the second page.

If someone can help it would be much appreciated. I would prefer to pull the data from the database rather than pass it in page parameters as I may want to display the same data on different pages.

Add a User field to the Total 1 table. Also add a Total 1 field in the User table (if Users are associated with multiple Total 1 items, make this a list of Total 1’s).

When a new Total 1 item is created, save the current user in the new User field. The action after this should be to make changes to the current user. Save the Total 1 that was just created to the User’s Total 1 field.

Hope that makes sense,
Daniel

Daniel

Thanks for your help. I ‘think’ what you’re suggesting is what I’ve been trying but cant quite get there.

“Add a User field to the Total 1 table. Also add a Total 1 field in the User table (if Users are associated with multiple Total 1 items, make this a list of Total 1’s).”

Totals

“When a new Total 1 item is created, save the current user in the new User field. The action after this should be to make changes to the current user. Save the Total 1 that was just created to the User’s Total 1 field.”

Workflow

I added the next action as ‘Make changes to current user’.

Now I go to the second page and this is where I’m not sure what to do. Adding this in shows what I want but I don’t think it’s user specific. Any other user sees the same total on that page.

Im from the phone so i cant attach any images but you should be able to do this:

Do a search for Totals:last item
And inn search constraints add:
Created by = Current User

Regards.

1 Like

Now on the second page, the initial content should be “Current User’s Total”.

But we don’t know if @john6 created the Total field type inside the User database.

So if he didn’t, he will not see that “Total” inside the Current User’s elements.

Edited: I saw now your comment:

Add a User field to the Total 1 table. Also add a Total 1 field in the User table (if Users are associated with multiple Total 1 items, make this a list of Total 1’s).

When the input value changes, I thought this would add to the database but it doesn’t for some reason.so seems to be falling down there. What am I doing wrong? Really appreciate your help here.

Year%201%20TotalWorkflow

Just to be clear, this input is on page 2 correct? Did the initial content work? If so, please explain your goal when this input changes.

No, this input is on page 1. When the value changes I thought this would add the fields to the database, but doesn’t seem to.

https://appymcpappy.bubbleapps.io/version-test/index/sample:user?debug_mode=true if that helps.

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