Skip to main content
1-Visitor
August 26, 2021
Solved

How to update the number of rows of an infotable?

  • August 26, 2021
  • 2 replies
  • 2734 views

Hello experts, 

 

I have an infotable called XXX for example, the infotable has a datashape that has only one attribute called element, so if a add one element, from Prperties and services the infotable appears like XXX(1), if i add other element, it changes to XXX(2).... i want a service to update the number of element based on the number i will give, i mean if i give 5 the number of elements in my infotable it changes to XXX(5). 

 

 

Thanks, 

Youssef

 

Best answer by VladimirRosu_116627

Hi,

When I spoke about a for loop, I did not refer to running through the infotable, but to add rows to an empty infotable to reach your desired count.

Following pseudocode (not real Javascript code)illustrates my idea:

for (var y=0;y<desiredNumOfRows;y++)

{

        myInfotable.AddRow(newRow);

}

2 replies

Support
August 26, 2021

Hi @YD_9850038

 

Hopefully, we're interpreting your question correctly.  The number in parentheses indicates the number of rows in the infotable.  If you want to change it to 5, you would need to add 5 rows, though it's not clear what the intent is.

 

Please provide more information and we'll try to assist.

 

Regards.

 

--Sharon

1-Visitor
August 27, 2021

Hello Sharon, 

 

 

Thanks for the reply!

What i need, instead of using the function addRow, when i give a number like 8 for example automaticaly it creates 8 rows in the infotable. 

I saw in javadoc and did find any function like setRow or something similar. 

 

Regards, 

Yous

Support
August 27, 2021

Hi @YD_9850038.

 

I'm afraid we still need more information.  What is your use case?

 

Regards.

 

--Sharon

Support
September 10, 2021

Hi @YD_9850038.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon