David
I am trying your suggestion. I have created a TextBox field and am trying to set the default of this using the following SQL Query:
SELECT TOP (1) Roles.RoleName AS DefaultValue FROM Roles INNER JOIN UserRoles ON Roles.RoleID = UserRoles.RoleID INNER JOIN Users ON UserRoles.UserID = Users.UserID WHERE (Users.UserID = $(UsersID)) AND ((Roles.RoleID = 29) OR (Roles.RoleID = 30) OR (Roles.RoleID = 31) OR (Roles.RoleID = 33) OR (Roles.RoleID = 32))ORDER BY UserRoles.ExpiryDate DESC
However, whenever I 'update' the question it just reloads the page displaying the question options (instead of just displaying the dropdown box to select the question you want to change) AND the "question" field (above the short name) is cleared of the text that was there.
If I replace the above SQL statement with the example one (Select count(*) As DefaultValue from users) under the SQL box everything saves OK but when you look at the field as a normal user nothing is displayed.
I am using DynReg 3.2.7 on DNN 4.9.4
Any ideas on how to get the SQL to work?
TIA
Antony