Pull data from another table and store it on the user

Hi,
I am having trouble finding a solution for the below mentioned. Every user in my app received a cut-off (%) based on an amount an a margin. The cut-off percentage is static (no specified formula) and is based on the amount and margin, per user. This means that the data is in 2 databases, which are “Users” and “Cut-off Database”>
My question is how do I setup Tadabase in such a way, that I can pull the cut-off factor from the cut-off database and store it on the user. Field Form Rules don’t work, since this would involves user engagement (by means of drop-down-selections). The aim is to let Tadabase run the query on the background and show the cut-off to the user.

Do I need to set this up with a Pipe or anything else? Have a look at the screenshot for further details.

Hi slimpens,

I’m not sure I understand exactly what you are trying to do, but I don’t think you even need a table to show your cutoff value. It looks like you can calculate it as a formula: Cutoff = (Margin - 1%) * 25
image

Hi @Henry , the table is Made Up by me, so there is no formula applicable. Its the question How to get data from one table to another.

@slimpens If you want to assign a record in your Cutoff table to each User, you will want to add a unique ID field in your Cutoff table (an Auto Increment field works well). Then you can assign a cutoff record to each user using a Connection field.

If you want to assign a Cutoff record based on some info already in the User table, you can use rules to assign a Cutoff record (again, using a Connection field).

Best regards,
Henry

Hi @Henry ,

I agree that this is good for performing the storing of the cutoff on the user. But how do I auto select the right cut off ? Maybe run a Pipe based on 2 values? Is there a maximum of the amount of fields a Pipe can filter on?

@Henry , I am trying to understand how to get the match based on the User Data, since Rules cannot be executed as a lookup function. Could you please help me clarify?

Hey @slimpens , I think I understand what you mean. There are always several ways to do things but you are correct in thinking you could use a Pipe to query the Table, pass the two field values and be returned a cut off value that you store in the User table.

If you’ve not used Pipes yet they are really neat and very powerful (I’m a novice, still learning) but I’d suggest you install the “Tadabase Rest API (Updated)” Pipe and look at this one, “Filter by Two Fields”.

Setup your Global Parameters first, then add your Table and field value into the Test section to ensure you’re getting the right response.

Let me know if you need any further assistance on this.

Graham

Hi @GREDDIE ,

yes, totally agree. Got some help from the guys from Tadabase with my issue. In general, Pipes are a good solution for almost running any kind of querie. There is no limit on the amount of fields you can filter on.