Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi Everyone,
I have one repeater which contain textboxes(all are string base type) and dropdown but I am not able to validate those widget which are in the repeater.
When I am using this repeater into another mashup where I want to validate all textbox and dropdown are mandatory filled.
I am using thingworx 8.1 version, Please help me if you have any solution on it.
Hi @DT.
Is the validator set on the inner mashup? If you run the inner mashup, does the validation work?
Note that you are running an extremely old version of ThingWorx that has not been supported in some time. The repeater widget was replaced in the more recent versions of the product by the collector widget, which performs much better.
We recommend upgrading to one of the supported versions of the product (9.0, 9.1, and 9.2) due to the many security updates, bug fixes, and new features that are available.
Regards.
--Sharon
Yes I know I am using too old version but as of now I have to manage all this requirement in this version only.
I attached image of my requirement you will get some idea.
Is the validator set on the inner mashup? If you run the inner mashup, does the validation work?
-I have applied validator on inner mashup but it failed because outer mashup submit button click event I have to sent to inner mashup which I don't know how to do it.
Description:
Hi @Dhiraj28.
This information was helpful but we're not understanding why you would need the use of the repeater widget in this case. Also, since you have the functions located in the outer mashup, instead of where the data is located, it doesn't know what to do with them. You can pass parameters between the two, but for this scenario it doesn't sound like it's needed.
Regards.
--Sharon
Hi @slangley
I need to add multiple row according to the requirement and Repeater is the one widget by using I can add multiple textboxes, dropdown as a one row.
So when I click on submit button I need to validate all the textboxes and dropdown should be mandatory.
Please help me how we can validate textboxes and dropdown which are in the repeater.
Hi,
In the repeater or the newer collection widget you will need to use a session variable to accomplish this task. The session variable will hold the data which can be modified in each row. This is also where you can indicate if the row is "valid" or not using the validator in the inner mashup. Once the submit button is clicked the data in the session variable is processed checking the validation flag before calling the next service or displaying an error message.
Thanks,
Travis
For one row I have done the validation part but when I add multiple row it will not working for multiple row.
For one row it is working but for more row it is not working.
steps:
From above steps I have done validation for only one row but how I can validate for multiple row.
I am struggling to do that?
Or Please let me know if I can do this adding multiple row by using any other widgets or any other grids so it will easy to validate.
Or
Should I do it using Grid widget but in the grid widget how can i add dropdown?
Should I display a multiple row which are given in the attachment by using grid apart from repeater widget?
Please refer attachment.
Hello,
For the session variable you will have to use an infotable with one row per data row or you can use a JSON variable with the row identifiers as keys. Please note there is a bug related to JSON session variables where you can not provide a default value on the thingShape. This has been fixed in later versions I am just not sure which version it started in.
This will also require you to manage the session variable when you are adding a deleting rows.
In a recent implementation I just did we used the incoming datas row number as the unique identifier into the session variable.
Thanks,
Travis
Hi @TravisPickett ,
Is it possible to show multiple row using grid table on the mashup as shown in attachment.
or Any other way to show multiple row without using repeater widget
Hi @DT,
It is not possible to have drop downs in the advanced grid or even the new grid in 9.2 and 9.3. So to achieve your goal the repeater/collection widget is the only option at this time with out writing a custom widget.
I am still waiting on clarification but I am being told that the 9.3 SDK does support the ability for dropdowns, but this would still lead to a custom widget I believe.
Thanks,
Travis