You want to expand \thenamecounter before \pdffield_checkbox:n absorbs the argument.
} (or another token of catcode 2) is essentially the only thing that won't be taken as #1 so you can define your command as
where \grab is your command taking an argument. This necessarily makes the construct not expandable.
I'm sure this could be better automated, but here, I expand the offending phrase with an \edef, before passing it to \loigiai.
EDITED to simplify input for the user. Instead of forcing an \edef upon the user, I create the macro \exloigiai which the user may alternatively use, which applies \expanded to the argument prior to passing it to \loigiai.