David, I have tried various combinations of this and have had no luck. To keep things simple, I first just created a simple textfield for ease of testing (located after the username/password/confirm password fields).
I tried the following as part of the SQL driven content for this text field:
select userid AS DefaultValue from users where userid = $(UserId)
The field is empty when displayed. I have a Username field as the first field in this form, which does display the logged in username. I also tried just hardcoding the userid as so:
select userid AS DefaultValue from users where userid =331
Same result (blank field).
So, since I have a Username field on the form (which does display the Username properly) I thought I would try something 'sneaky' like:
select userid AS DefaultValue from users where username = '$(Username)
That also results in an empty textbox. So far I have been unable to get any of these to work. The documentation does indicate UserID is valid here, but niether that, nor any existing field name (Username) results in anything other than a blank text field.
I also found this thread: https://www.datasprings.com/Products/ProductForums/tabid/727/forumid/3/tpage/1/view/topic/postid/862/language/en-US/Default.aspx#862
Is this really the case? Is there *anyway* for my stored procedure (or any other SQL driven field) to be able to key on the current user in someway? Surely this must be possible and I'm just missing something...?
Not sure what to try next.
|