Hi,
We are using scancl.aspx for scanning (Datacap 8.1). We have configured ADSI authentication for scaning.
I can get the scan operator's ID from the ScanOperator variable.
We need the Host name or IP Address of the scan operator. How can we get it? Do we have any smart parameter for getting the host name or IP address of the scan machine?
thanks,
Geetha
Answer by PankajKD (51) | Feb 06, 2015 at 02:25 PM
Under WindowsOn_Load()
Dim HostName
Set HostName=CreateObject("WinNTSystemInfo")
'After oNode Object creation add below code
Set bVar=oNode.selectSingleNode("V[@n='ScanningHostName']")
If bVar is not Nothing then
bVar=HostName.ComputerName 'static variable already created
Else 'Create Variable
Set bVar=xF.createElement("V")
Call bVar.setAttribute("n", "ScanningHostName")
Set bVar=oNode.AppendChild(bVar)
bVar.text = HostName.ComputerName
End If
~Pankaj
Answer by MoizQ (2966) | Jan 29, 2015 at 04:31 PM
I don't think it's feasible OOTB. If you have a start batch panel then you can use client-side scripting to populate a field with the corresponding value within a custom panel. That would be the direction I would explore; you should be able to disable modification of the field using ReadOnly variable.
(I don't recall if TM8.1 FP2 OOTB has a defect with custom panel usage in scanning; it is supported, however, so if there's any issue then you can either wait for FP3 or request a test module depending on urgency.)
Answer by geethajini (168) | Jan 30, 2015 at 06:16 AM
Thanks for reply MoizQ. I wanted to know if we have a smart parameter to get the IP address because I can see the IP address in Job Monitor tab-> Web Monitor.
We have 7 other fields in start batch panel where the user has to enter data. I don't know how to hide a field in start batch panel.
Hence, I am trying to write a custom action in dotnet which would get the machine name of scan operator and write it to a variable. Adding this profile to MainTaskProfile of scan task. Need to check if this works.
thanks,
Geetha
Answer by PankajKD (51) | Feb 04, 2015 at 01:20 AM
Hi Geetha,
Datacap Login page by default takes the host name as station ID.
What you need to do is save same value in Batch variable in Scanl.aspx page.
You can create variable on run time if it doesn't exist or you can create static variable at batch level
Hope this is what you were looking for
Thanks and Regards
Pankaj
Answer by geethajini (168) | Feb 04, 2015 at 04:17 AM
Hi Pankaj,
Datacap by default writes the StationID to a batch level variable ScanStation.
We have configured ADSI authentication. we see that the user has to provide a station id which is available in the list of stations for logging in.
If we want the scan operator's host name, then we would need to add the host name to stations list. But the scan operator can still login with any other stationid which is present in the list.
What is the type of authentication you are using?
thanks,
Geetha
Answer by PankajKD (51) | Feb 04, 2015 at 02:34 PM
Hi Geetha,
Datacap by default takes Host name as Station but users login by using station available in station list for eg:1,2,3
User can still login by any available station or hide the station option and default to 1 in default.aspx file.
After that write a code in windows_onload() of scanl.aspx file like in default.aspx file
Create WshNetwork object and access computer name and pass it to batch level variable(static or dyanmic)
Note:You don't need Datacap Station ID for any authentication except Datacap Taskmaster Authentication.
Answer by geethajini (168) | Feb 06, 2015 at 08:26 AM
As you said, I am not able to get scan machine's host name or ip address within rules execution.
thanks,
geetha
Answer by geethajini (168) | Feb 06, 2015 at 08:32 AM
thanks for reply Pankaj.
Can you please tell, how we can pass a value to batch level variable(static or dynamic) from scancl.aspx.
Can you please share code snippets.
I have a requirement to get the machine name or IP address of the scan machine.
thanks,
geetha
Answer by geethajini (168) | Feb 09, 2015 at 05:12 AM
Thanks a lot Pankaj.
I will try your code.
Regards,
Geetha