Skip to main content
March 6, 2021
Question

Storing current queue item in PV

  • March 6, 2021
  • 7 replies
  • 0 views

Hi All,

I'm building an use case where there is a need to iterate through a queue and Fill some forms. For this, I will need to save current row items from a queue in to few process variables. Later, I use these process variables to fill values on browser forms.

How do we save a queue current row/item into PV/PV's?

Thanks in advance,

Arjun.

7 replies

stefanhelzle0001
March 6, 2021

I would add an integer PV initialized with 1 and increased in each iteration. Think of it like a kind of for-loop.

March 6, 2021

so if I understand this correctly, you need to iterate over a few forms (which I hope it has the same data type) and collect data from all of them, then display the data that was collected off of these forms in one interface.

If you do use one datatype, then you could create an array that contains an index for each of the forms that needs to be sent, and as Stefan said, you can create a PV counter and use that counter to save each form data in the correct index of the array I mentioned earlier, then when you want to display the data, you can just iterate over the array of form data that you have and display it how ever you see fit.

best of luck

arjunv489Author
March 7, 2021

Thanks for the suggestions Stefan and Ahmad.   have an excel file with 1000 rows and 5 columns and we need to do a data entry to a system through browser. we have PV for each column and will need to save the row values (5 column) in to these PV's. 

March 7, 2021

my point still stands, you need an obj (or a CDT in this case) which has 5 attributes for your 5 columns in the excel sheet, and you need to read those columns and append them to the array of that same CDT you created earlier.