Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi All,
I have a query regarding how to add values to a scrollable panel so that every 10 seconds it should display the updated values corresponding to a label.
I will attach the screenshot for a better understanding of the query.
I want a use case where,
Temp1(label) corresponds to 26 (value)
After 10s,
Temp2 (label) corresponds to 18 (value)
After 10s,
Temp 3 (label) corresponds to 5 (value) and so on.
The panel has to be updated automatically after the specified time interval. Kindly provide a solution if the query is clear.
Thanks in Advance.
Regards,
Airin
Solved! Go to Solution.
Thanks for confirming. I do have a work around to achieve something similar to what you seek. Please try the below steps:
var result = me.Test; //Test is the property bound to the label on the Mash up //TempValue is the string created to withhold the values if(me.TempValue !== '') { me.TempValue = result +" "+ me.TempValue; } else{ me.TempValue = ""+result; } result = me.TempValue;
Please let me know if you have any questions with the implementation.
Hi Airin,
Could you provide more inputs on how you achieved the scrolling panel? From the image you have attached, it appears that you placed a label widget inside a panel. The scroll appears because the text assigned to the label inside the panel has grown out of the label and panel height. Please correct me if I am wrong.
Best regards,
Rajesh.
Hi Rajesh,
Yes, your assumption is right.
For the time being, I placed a label inside the panel to give an idea how the entries should look like.
What I really want to achieve is, a dynamically changing name field and corresponding value field inside a scroll panel.
If that's possible, kindly help me with a solution.
Thank you for your time.
Best Regards,
Airin
Hi Airin,
Thanks for confirming. I have a work around to achieve your functionality. But, it becomes hard to keep track of the one to one correspondence as the list/values grows. Please follow the below steps to achieve this:
var result = me.Test; //Test is the property name you would be binding to the label
//Tempvalue is a property of type string added to the Thing
if(me.TempValue !== '') { me.TempValue = result +" "+ me.TempValue; }
else{ me.TempValue = result; }
result = me.TempValue;
Please let me know if you have any questions in the implementation.
Best regards,
Rajesh.
Thanks for confirming. I do have a work around to achieve something similar to what you seek. Please try the below steps:
var result = me.Test; //Test is the property bound to the label on the Mash up //TempValue is the string created to withhold the values if(me.TempValue !== '') { me.TempValue = result +" "+ me.TempValue; } else{ me.TempValue = ""+result; } result = me.TempValue;
Please let me know if you have any questions with the implementation.
Please note that even with the solution provided, it would be hard to maintain one-one correspondence as the data set grows too large too soon. Keep you mind that you intend to update the value every 10 seconds. I would recommend introducing a counter in the service in such a way that the list would store only 10 sets of reads. This way, your one-one correspondence becomes little manageable.
Best regards,
Rajesh.