Connect increment value to specific user

I think my current setup is close…but not quite right.
Use case description:

  • the ‘generate image’ command from the OpenAi integration creates an image based on a prompt. :white_check_mark:This works.

  • In order to cap the amount of money that will be spent from using OpenAi, each user can generate up to 3 images per day. Every time they generate an image, a value increments. :white_check_mark: This works

  • [This part doesn’t work] Data for the prompt is stored in ‘Sheet B.’ Data for the increment number is also stored in ‘Sheet B.’ User profile info is stored in the ‘Users’ sheet. I tried using the array feature to pull in the row ID and email from ‘Users’ into ‘Sheet B’ so that I can cap each user at the same number of images generated. When I view the app as different profiles, I see the array info change but the user-generated image content does not change.

I am not correctly tying ‘Sheet B’ to ‘Users’ in order to calculate a per-user cap on image generation.
May I ask for help to identify where I went astray?

I’m not quite sure that I follow your logic, but here is how I would do this:

  • Ensure that you are saving both the users email address and date generated in the table where your images are stored.
  • In your User Profile table, create a Query column that targets your Image table, and apply the following filters:
    – Email address is This row->Email
    – Date is within Today
  • Add a Rollup->Count via the Query column
  • If the count is equal to 3, don’t allow an image to be generated (I would use the count as a visibility condition)