Creating and modifying multiple instances of datamaster items.

Nick Charitidis shared this question 6 years ago
Answered

In the prototype we are building there was a need to do the following:


- Copy multiple datamaster items (in other words use new many times at once)


- modify many datamaster items at once, but every item should be modified differently depending on one field.


The only way I have found to do that is to simulate a for loop by refresing the page many times (I have a variable i and I increase it on page load etc).


Apart from being time consuming this method has one problem, it ends up having some delay. The more datamaster items, the bigger the delay.


Is there a better way of doing the above actions so that it is done more efficiently, or at least so that the performance of the exported prototype is faster?


It would be nice to natively support these features in a later version, but for now is it something that can be done about this?

Comments (4)

photo
1

I can't think of a better way to copy multiple items than the one you mention. But I think there is a better way to do the multiple modify. Now the modify can modify one item or a collection of data master items if you define it as the first parameter of the option. So maybe you can define several modifies using a filter function as the first parameter.

photo
1

Yes you can modify various datamaster items by using the filter function to define which items you want.


However all the items you are going to modify will result having the same value in the parameters you use.


What I want to do is this for example: Let's say you have a field named product id.


I want to be able to modify the datamasters depending on the product id, So each datamaster item will end up with different values.

photo
1

I don't know if that is possible. Someone out there willing to give a hand here?

photo
1

Hi Victor, is it possible to add multiple filter condition for a modify action on a datamaster?