Participant's ID

106 views
Skip to first unread message

Patrik Havan

unread,
Nov 2, 2021, 3:41:50 PM11/2/21
to formr
Hello,

I want to assign ID/code to all participants. I know that I can use get_code, but I want that participants will see this information as well - they can write their code and if they will want to be excluded from sample, they will have this possibility.

Can anyone help me please?

Thank you
Patrik Havan

Sebastian

unread,
Apr 4, 2022, 5:28:25 AM4/4/22
to formr
Dear Patrik,

Have you solved your issue yet? I would have asked the same question :)

Kind regards,

Sebastian

Ruben Arslan

unread,
Apr 4, 2022, 6:54:47 AM4/4/22
to Sebastian, formr
You could put
Your user ID: `r survey_run_sessions$session` in a label column for a note.
or 
Your user ID: `r stringr::str_sub(survey_run_sessions$session, 1, 8)` to make it more manageable but still unique.

Best,

Ruben

--
You received this message because you are subscribed to the Google Groups "formr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to formr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/formr/c4ce2c67-71a7-46ac-b64d-83e7954721b9n%40googlegroups.com.

Luigi

unread,
May 10, 2022, 3:36:19 PM5/10/22
to formr
hi,

when i try to use it i alwas get an openCPU error

this is the output

(function() {
    library(formr)
    Base_Pt = as.data.frame(jsonlite::fromJSON("{\"user_c\":[null]}"), stringsAsFactors=F)

    (function() {with(tail(Base_Pt, 1), {
formr.showifs = list();
within(formr.showifs,  {
user_c = (function(){
´r substr(Base_Pt$session, 1, 7)´
})()
})
})})()

})()

greetings
Luigi 

Ruben Arslan

unread,
May 10, 2022, 3:44:49 PM5/10/22
to Luigi, formr
Use the exact code I sent. No need to adapt.
stringr::str_sub(survey_run_sessions$session, 1, 8)

Luigi

unread,
May 10, 2022, 3:51:25 PM5/10/22
to formr
hey,

i use the exact code. here'sBildschirmfoto vom 2022-05-10 21-48-06.png

hey i use the exact code. i got the same error using "calculate" and the code in the "value" column.

greetings
luigi
Reply all
Reply to author
Forward
0 new messages