How to Cross-reference Two Databases?

I have a text element that displays a user’s token balance (stored in Payments DB) using the following logic:

*Search for Payments:first item’s Tokens *
(Condition Created by = Current user)

I want to add free trial functionality, these users would not be included in the Payments DB (entries created by the stripe subscription workflow & maintained by webhook) and although I could add them, and my webhook logic is robust enough to avoid this generating errors when the webhook pushes an update for the same email, I would rather use the User DB, and keep the Payments DB just for paying customer records as intended.

To do this I would need to be able to cross-reference the Payments and Users databases. Eg, to retrieve a users token balance, the logic would need to be:

If Created By = Current User is not found in Payments DB > Text = User DB Trial Tokens
else Text = Current Users Payments DB Tokens

I would also need to do a similar thing in a few other workflows, can anybody tell me if this is possible and if so, how to go about it?

Hi there, @blogshackltd… if I understand your post correctly, you could add a condition to the text element that says when Search for Payments:count is 0 (constraint Created by = Current User), change the text to Current User's Trial Tokens.

Hope this helps.

Best…
Mike

1 Like

Thanks mikeloc, yep that did it :slight_smile:

1 Like

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