Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Login Position

Status
Not open for further replies.

waxman

MIS
Apr 16, 2001
19
0
0
ID
Hi,
We have developed several scripts but there comes new requirement where User don't want to input and re-input their Ellipse Login Information. So, we provide a new Login form and user types input here. However, several users have more than one positions and we don't want user to input the position themselves.
Does anyone here know how to get the Position information and put it to the Login information as in a Listbox?

Here is the code we currently use:

Set objMIMS = New MIMSXServer
objMIMS.Initialise
objMIMS.ServerConnect True
objMIMS.RegistryGetDefaultProfile

objMIMS.SendLoginBlock True, True, UCase(Trim(frmDownload.txtUsername.Text)), UCase(Trim(frmDownload.txtPassword.Text)),
UCase(Trim(frmDownload.txtDistrict.Text)),
UCase(Trim(frmDownload.txtPosition.Text))

TIA.

 
Hi waxman,

Not sure if this will help you as this is just bits of code I've used when switching between different MIMS logins using the "MIMS.Login" service (I've never actually used "SendLoginBlock" method).

But hopefully if nothing else it will give you a starter for 10

Please note that this should really just be considered pseudo-code as it doesn't have declarations, tidying code or errror handlers.

Code:
Set objLoginReply = objMIMS.SendLoginBlock True, True, UCase(Trim(frmDownload.txtUsername.Text)), UCase(Trim(frmDownload.txtPassword.Text)), UCase(Trim(frmDownload.txtDistrict.Text)), UCase(Trim(frmDownload.txtPosition.Text))

'
' Insert code here to extract returned attributes "LoginOkFlag", "PositionRequiredFlag" from objLoginReply
'

'
' If the "LoginOkFlag" = "N" and "PositionRequiredFlag" = "Y" 
' Then run the following code.
'

Set objMimsBlock = objMIMS.Blocks.New("RetrievePosBlock")
Set objMimsRequest = objMimsBlock.Requests.New("RetrievePosRequest")

objMimsRequest.AddFieldNameValue MIMSX_FLAG_SERVICE, "MIMS.RetrievePositions"
objMimsRequest.AddFieldNameValue MIMSX_FLAG_REPLYLIST, "Position,PositionTitle"
objMimsRequest.AddFieldNameValue MIMSX_FLAG_MAXINST, "50"

Set objMimsReply = objMimsBlock.Send

'
' Extract positions from objMimsReply 
' Display them in ComboBox etc
'

Reply back to the forum if you have any other queries and I'll try to help.

Cheers,

Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top