cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modify meta attribute values in one dropdown on change of a dropdown

ColruytTeam
Honored Contributor

Hi All,

Can any body tell me the way to change the metaattribute values of one MetaAttribute (dropdown) onchange of another MetaAttribute (dropdown).

 

Like:

if I select "fruit" from category dropdown, the values in second dropdown should be "banana", "orange", "apple"

if I select "flower" from category dropdown, the values in second dropdownshould be "Lotus", "Lilly" and etc,.

 

 

 

 

Colruyt Team
5 Replies

when you say new Attribute Values are these values static or dynamically changing? if Static I would suggest creating another attribute and hide previous attribute and show new alternative enumeration attiribute if these values are dynamic i don't suppose you be able to do it by adding more attribute values neither you should.

Hi,

If you explore meta attribute, you will see MetaAttributeUpdateTool under impact analysis ends (in yellow color). There you have to connect/create the macro.

 

Regards,

Venkatesh

Colruyt Team

matthewfoo
Super Contributor

Sorry to dig this thread up again. I am trying to do similar things but how and where do I create a MetaattributeUpdateTool macro and connect to a Metattribute? I try new on the Metaattribute for a new Macro but the end result macro doesn't provide me with the VBScript function header of  Function AttCtl_OnCommand

ColruytTeam
Honored Contributor

Hi Jerome,

Iam already using updatetoolMacro.

In that Macro I already have the code to fire event onchange of first metaAttribute dropdown. (as below)

 

'May be implemented to catch a command  - returns False to invoke default implementation
Function AttCtl_OnCommand(Context As MegaUpdateToolContext,Item As Integer,Notification As Integer) As Boolean
  If Not Context.EditText = PreviousText Then
      PreviousText = Context.EditText
      MsgBox "Value Changed"
  End If
End Function

 

All I need is to fill the second dropdown with new metaattribute values.

 

Can you please provide some KB or example code to acheive this.

 

Regards,

Venkatesh

 

Colruyt Team

jhorber
MEGA
MEGA

Hello ColruytTeam

 

HOPEX does not implement natively dependent fields

You need to try with computed MetaAttribute in particular 'UpdateTools'

 

Run the following query to get examples in the standard metamodel

Select [MetaAttribute] Where [MetaAttributeUpdateTool].[VB Script] Not Null

 

Jerome