#dominoforever | Product Ideas Portal

 

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Add a way to get the index of the current element inside @Transform

Having access to the index of the current element inside @Transform would be very useful for certain applications, e.g. separate transforms for even and odd elements or referencing other lists. Something like @ThisIndex (compare @ThisName and @ThisValue) would be great.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Sep 4 2020
  • Unlikely to implement
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    16 Sep 10:17am

    I'd use a counter for that (if I ever had the need).

    Transforms may be nested. Which Transform would @ThisIndex reference?

    I'd rather like the following to be valid:

    myList[index] := someValue;

    We could process lists with @for then

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    8 Sep 09:30am

    Another example where this would be useful is if you need to do something special for only the first and last elements of a list (where post-processing them would be tricky).

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    6 Sep 07:28pm

    FWIW, JavaScript's Array.prototype.map() (or rather its callback) also has an index parameter, which is occasionally very useful.

  • Admin
    Thomas Hampel commented
    6 Sep 07:21pm

    Hm, this seems to be a very very special case, lets see how many people will need it and vote for it. For reference here is the documentation of this @Transform : https://help.hcltechsw.com/dom_designer/11.0.1/basic/H_TRANSFORM.html