This topic is locked
[SOLVED]

 Drop-Down default value not populating on Add

1/10/2007 1:08:08 AM
ASPRunnerPro General questions
C
clig author

On certain IE 6 installs I've encountered default values not displaying on the add page - for example the dropdown stores a value from column 1 but displays value from column 2
V 4.0
Anyone come across this before?
So far it has been discovered on both XP and 2000 with the latest windows updates

J
Jane 1/10/2007

Hi,
if you use different fields for Link and Display dropdowns on the Edit format dialog you need to use value from link field in the Default value box.

C
clig author 1/10/2007

Hi,

if you use different fields for Link and Display dropdowns on the Edit format dialog you need to use value from link field in the Default value box.


Of course - these drop downs actually work on most clients except on a couple machines... the drop down is based on:
Dim strUserID

strUserID = Request.ServerVariables("AUTH_USER")

or

strUserID = Request.ServerVariables("LOGON_USER")

or

Request.ServerVariables("REMOTE_USER")

  • either works on most boxes
    strUserID = Mid(strUserID,(instr(1,strUserID,"\")+1),len(strUserID))
    ***

    if strField="EnteredBy" then GetDefaultValue = strUserID end if
  • the underlying table is a user table and "name" is displayed based on login id
    this field is always correct on the same page so the value is there...
    if strField="Modified" then GetDefaultValue = strUserID & " - " & Now() end if
    I don't think this is necessarily an ASPRunner problem rather a quest to see if anyone has experienced this as well - my situation can't be unique...
    one thing of interest though - if I set: strUserID = Session("UserID") in the same spot: CCAT_Issues_aspfunctions.asp
    Dim strUserID

    'strUserID = Request.ServerVariables("AUTH_USER")

    'strUserID = Request.ServerVariables("LOGON_USER")

    'strUserID = Request.ServerVariables("REMOTE_USER")

    strUserID = Session("UserID")

    strUserID = Mid(strUserID,(instr(1,strUserID,"\")+1),len(strUserID))
    ' returns field's default value

    function GetDefaultValue(strField)

    if strField="IssueID" then GetDefaultValue = "" end if

    if strField="Project" then GetDefaultValue = GetRequestForm("masterkey") end if

    if strField="Customer" then GetDefaultValue = Session("Customer") end if

    if strField="CustomerNumber" then GetDefaultValue = Session("CustomerNumber") end if

    if strField="LastCall" then GetDefaultValue = Session("LastCall") end if

    if strField="simsDate" then GetDefaultValue = Session("simsDate") end if

    if strField="Description" then GetDefaultValue = "" end if

    if strField="Conclusion" then GetDefaultValue = "" end if

    if strField="Status" then GetDefaultValue = "Open" end if

    if strField="Priority" then GetDefaultValue = "Minor" end if

    if strField="DateEntered" then GetDefaultValue = Now() end if

    if strField="EnteredBy" then GetDefaultValue = strUserID end if

    if strField="AssignedTo" then GetDefaultValue = strUserID end if

    if strField="CTASTicketsID" then GetDefaultValue = "" end if

    if strField="InterVoiceTicketsID" then GetDefaultValue = "" end if

    if strField="OtherTicketsID" then GetDefaultValue = "" end if

    if strField="SimsCDNTicket" then GetDefaultValue = Session("Project") & "*" end if

    if strField="DateResolved" then GetDefaultValue = "" end if

    if strField="Resolution" then GetDefaultValue = "" end if

    if strField="ResolvedBy" then GetDefaultValue = "" end if

    if strField="FollowupDate" then GetDefaultValue = "" end if

    if strField="WhereResolved" then GetDefaultValue = "" end if

    if strField="Modified" then GetDefaultValue = strUserID & " - " & Now() end if

    if strField="ServiceNotes" then GetDefaultValue = Session("Notes") end if

    if strField="SYS Type" then GetDefaultValue = Session("SYSTYPE") end if
    if LCase(GetDefaultValue) = "now()" then GetDefaultValue=now() end if

    if Len(GetDefaultValue)>2 then

    if Left(GetDefaultValue,1) = "'" and Right(GetDefaultValue,1)="'" then GetDefaultValue=Mid(GetDefaultValue,2, Len(GetDefaultValue)-2) end if

    end if

    end function
  • works even on the broken machines
    thanks

C
clig author 1/10/2007

Hi,

if you use different fields for Link and Display dropdowns on the Edit format dialog you need to use value from link field in the Default value box.


I believe I have the answer: the value is case sensitive in ASPRunner
So on certain machines a login will start with Txxx however that value is stored in the user table as txxx - To test this:
actual value in table = t12345
login asp = type in t12345 works - try T12345 returns - "Invalid Login"
looking at server variable - this is the case...