Hello friends!
I have a list of items that is pulled from air table. I added an action button with a custom url something like this:
https://myurl.com?document={{s3_file_name}}&email={{loggedin_user_email}}
Questions:
- how can I replace
{{s3_file_name}}
with a value from air table record (for the record that is listed)?
- How can I replace
{{loggedin_user_email}}
using the logged user email?
I am pretty sure I solved [2] by using window['logged_in_user']['softr_user_email'];
but please correct me if I am wrong.
I assume I need to do some kind of listener and for each record I run something…but not sure how to access the air table data elements…
Thank you!
Friends,
I forgot that I can concatenate text and fields in air table and use that as the link location. Solution:
- Add a New Field in Airtable:
- Go to the table where you have the
s3_file_location
field.
- Add a new field, and select the Formula type.
- Enter the Formula for Concatenation:
- Use the following formula to create your custom URL:
"https://myurl.com?document=" & {s3_file_location} & "&email=CUSTOMER_EMAIL"
- Here:
"https://myurl.com?document="
is the static text.
{s3_file_location}
is the Airtable field containing the file location.
&email=CUSTOMER_EMAIL
keeps the CUSTOMER_EMAIL
part as static text.
- Save the Formula Field:
- Click Save after entering the formula. Airtable will automatically generate the concatenated URL for each row in that field.
Now, each record will display the URL in this field with the actual s3_file_location
value from that row, and CUSTOMER_EMAIL
will remain as-is. You can use this field in Softr to populate links dynamically.