Pass User Variable in to Custom Code Block

Is it possible to pass along a variable from the current user in to a embedded code block?

In the Airtable record for each user, we have a code that is used to call up a particular form for each user. We’d like be able to load that particular field value in the embed code.

Search for window.records in the forum, I think IDuser = window['logged_in_user']['airtable_record_id'];could work with Js, to adapt to any field from airtable

Yes, that’s right.

To add on: how to get this parameter into the embed block will vary depending on what you are embedding. If you can say more about exactly what you’re trying to embed, we can help with specifics of how to do it.

@dcoletta Thanks for the help! Here’s the use case for the variable that I’d like to get out of Airtable and have that in this code snippet (puts a Paperform inline in the page):

<div data-paperform-id="companah-joco" data-takeover="1"></div><script>(function() { var script = document.createElement('script'); script.src = "";document.body.appendChild(script); })()</script>

The first DIV attribute is the id for the form, in this case “companah-joco”. In this case, the variable item would be “joco”, and that is what I would like to be able to pull from the user record in Airtable.