Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

How to display all devices into a table in a subpage.

$
0
0
Hello community.
I know its probably a very basic topic but even a key word to look for or where to look in the documentation would help.
I am very new at coding and NAV overall so sorry for my shitty code.

I use POS for .NET to show text on my display. To make it possible I used:
FOR  i := 1 TO 21 DO BEGIN
  PosDeviceInfo := PosDeviceCollection.Item(i);
  MESSAGE(STRSUBSTNO('%1 is %2',i,PosDeviceInfo.ToString));
to locate what Item(int) my target device (Line Display) has.

But right now I would like display all pos devices from 1 to 21 in a list that I added in a subpage which references to a table with 2 Columns: Device ID, Name
u07qvacf7wpc.png

And I really have no clue where to start it so that it gets displayed. Is it even possible? Where do I even code this? In my "Test Display" Page, in the subpage where I attached the table "Device Collection Sub", or in my newly created table "Device Collection".


Heres my code that im using to show some text on the display. Ive got it in my "Test Display" Page in Page Actions. It's all working, I just want to display every device on the list in the bottom part of the image.
Instantiation - OnAction()
PosExplorer := PosExplorer.PosExplorer;
PosDeviceCollection := PosExplorer.GetDevices();
PosDeviceInfo := PosDeviceCollection.Item(DeviceID);
PosLineDisplay := PosExplorer.CreateInstance(PosDeviceInfo);

Claim Display - OnAction()
PosDeviceType := PosDeviceType;
//IF NOT PosLineDisplay.Claimed THEN BEGIN
  PosLineDisplay.Open();
  PosLineDisplay.Claim(10000);
  PosLineDisplay.DeviceEnabled(TRUE);
  PosLineDisplay.ClearText();
//END;


Release Display - OnAction()

Show Text - OnAction()
PosLineDisplay.ClearText();
PosLineDisplay.DisplayTextAt(0,0,AnzeigeText1);
PosLineDisplay.DisplayTextAt(1,0,AnzeigeText2);

Show Devices - OnAction()
PosDeviceCollection := PosExplorer.GetDevices();

FOR  i := 1 TO 21 DO BEGIN
  PosDeviceInfo := PosDeviceCollection.Item(i);
  MESSAGE(STRSUBSTNO('%1 is %2',i,PosDeviceInfo.ToString));
  //PosDeviceInfo.HardwareId
  //PosDeviceInfo.ServiceObjectName
END;

I somehow need the last 2 Lines (Parameters) to show in the table for all 21 Devices. Hopefully it is possible.
//PosDeviceInfo.HardwareId
//PosDeviceInfo.ServiceObjectName

If you need any more screenshots or better explanation just ask away.

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>