However, if see it in the group tag, it is like the following.
[{"Customer#1":[{"Facility":},{"Building":},{"System":}]},{"Customer#2":},{"Customer#3":},{"Customer#3":}]
So, if I read the group tag value from the experience page javascript, it returns the string with “"”, so I have to process this string once again.
My question is, how to save the JSON string properly into the group tag so that it does not have “"”?
I’m assuming you are taking that value from data.body.name and setting it as a group tag using a Group: Update Node? Most likely the issue is you are referencing the value as {{data.body.name}} (two braces) vs. {{{data.body.name}}} (three braces).
The two-brace version will escape any special HTML characters, such as those quotes. The three-brace version will not, which is what you want.
One word of caution about storing JSON strings in tag values: The values support a maximum of 255 characters, so take extra care to be sure any values you are storing in that manner will fit within that limitation.
So, as for the maximum length of the tag value, 255 characters is too short for our project.
So I would like to store the customer & device hierarchy in the experience user group tag value.
This hierarchy should be different according to each user group, so I think it is reasonable to store it in the user group tag value.
But, 255 characters is too short to save the hierarchy. So how can I achieve this goal without using the tag value?
What do you mean by the “hierarchy”? Is this different from the parent structure and device association that is natively supported and is retrievable through the workflow engine? If it is different, I’m interested to hear why those two features are not fulfilling your requirement; and if it is not different I’d like to know why it is necessary to store that information in a device tag instead of retrieving it at runtime in a workflow execution?
That said, string values in data table rows store 768 characters, so an alternative would be to put the JSON string in a data table row and associate the group to that row one of two ways: by storing the row ID on the group and looking up that row in a workflow, or the opposite - storing the group ID as a column in that table and retrieving the JSON string that way.
So, this hierarchy should be modified by the user. The user should be able to create a new customer and asset as he/she needs and assign the devices to any asset of any customer.
So I already implemented the solution for this using the user group tag, but as you know its limit is too short for me.
So, if the number of the customer, asset and the devices is increased, 255 characters is too short to save this hierarchy structure.
Of course, I think I can use multiple tags, but it makes the structure too complicated.
Hope this information will be helpful.
If you have any other solution for this, please let me know.
Thanks.
You can certainly roll your own hierarchical multitenancy structure through group tags and data tables as I suggested before, but based on what I know so far, what you are doing here fits very well into the model we have built already and have several features to support.
I recommend checking out these Deeper Dive Webinars on Experience Groups and multitenancy models before you get too far into building your solution, in hopes that you don’t make more work for yourself in the long run:
So I have checked the nested experience group, and it does make sense. And then, it looks like it fits to our requirement for now. The problem is that the user should be able to modify the hierarchy as he/she needs on the dashboard. So I think I will need to develop the experience page to do this.
I tried to find the nested experience group application in the example applications, but I can not find it.
So, where can I find this example? Can you please let me know?
Thanks
You could also start a new application from the Industrial Equipment Monitor template, which also demonstrates a multi-tenancy model - but it won’t include any features around editing the tenancy model from the experience side.