June 3, 200916 yr Hi, I have a group of unlimited products, the each group group_id SKU sku_order 1 AJ 1 1 OK 2 1 LM 3 I want to create a key for performance reasons for each unique group which is the concatenated SKUs so the key of group one would be AJ OK LM But to me the sku order is just a cosmetic issue, for my use LM AJ OK would be the same so I'd like to generate a key that's the same regardless the order. so I need a trasnformation that would give the same result f(AJ OK LM)=Key f(LM AJ OK)=Key Key=Key
June 3, 200916 yr You could use a value list to sort your items alphabetically. Or just sort the relationship - the List() function will follow that. I am not sure what's purpose here - you already have a common key value.
June 4, 200916 yr Author Yes the ordering seems a good idea but it only works just during the creation of the group. If the user changes the order afterwards, then it doesnt work. The goal is to have an indexed key. So valuliest aren't possible. Of course, we can recrate the key when user changes the order that's true, but cumbersome
June 4, 200916 yr The goal is to have an indexed key. Your original post didn't say anything about indexing. As I am sure you are well aware, a calculation that references data from other records must be either unstored or it will not update automatically when the referenced values change. This has nothing to do with the question of ordering those values: to use your own terminology, f(AJ;OK;LM) cannot be indexed, because (AJ;OK;LM) cannot be indexed.
June 4, 200916 yr Author The key will be generated when the user puts the sku in the group, so it will be plain text and will get indexed.
June 4, 200916 yr I don't understand your post: when user adds a sku to a group, the other members of the group will either update their key (if unstored) or not (if indexed).
June 5, 200916 yr Author when user hads a sku in the group a script willbe trigered that will update the group key. so the key remains indexed
June 5, 200916 yr Well, then what's the problem? When the script updates the group key, have it update the key with a sorted version. Or have another text field with an auto-entered calculation that will update when the group key is modified. FWIW, I don't see the purpose of this, and I don't think it's good practice.
Create an account or sign in to comment