Hi,
I am using the api to copy child rows of data, however, at the moment the app runs with the RUNASUSEREMAIL variable set to me. I would like to change it to the user who activates the workflow. How can I used the USEREMAIL() function in the API? What I have shown below doesnโt work.
{
โActionโ: โAddโ,
โPropertiesโ: {
โLocaleโ: โen-GBโ,
โLocationโ: โ47.623098, -122.330184โ,
โTimezoneโ: โPacific Standard Timeโ,
โRunAsUserEmailโ: "USEREMAIL()"
},
This looks correct per the support doc. What do you mean it doesnโt work?
Are there any errors in the logs?
What is your end-goal?
What do you want to do with USEREMAIL()
in the next step of the workflow?
In the data instead of seeing the usersโ email addressโฆ it shows USEREMAIL() as text. I would like to show the userโs email address.
This means in the table that is being copied, I have a field โAuthorโ that is populated with their USEREMAIL when they initially fill out the recordโฆ however when using the API, previously it was putting in my email address. When the API is triggered, I want it to add the new records as the userโs email address, however with the script above, it puts in โUSEREMAIL()โ into the Author field.
Oh, I see what the problem is. In your template, you need to use angle brackets around the code.
"RunAsUserEmailโ: โ<<USEREMAIL()>>โ
It was just passing the string โUSEREMAIL()โ.
I will give this a try. Thanks @GreenFlux.
I m not sure but why dont you push useremail()) witin the api request body in JSON ?
Hi @tsuji_koichi, I did put that in the json code, however the variable USEREMAIL() was not recognised. It recorded โUSEREMAIL()โ in the datasource, instead of the usersโ email address.
Actually what I wanted to suggest was the exactly same as @GreenFlux suggested to you. I reckon it should work and follow his instructions.
User | Count |
---|---|
18 | |
14 | |
11 | |
7 | |
4 |