cancel
Showing results for 
Search instead for 
Did you mean: 

Default value for a characteristic in variant configuration

jepi_flanders
Participant
0 Kudos

Hi all,

I have the following requirement:

within a multivalue characteristic, I need to define a default value (say, 'VALUE1') if no values have been selected by the user; but, as soon as the user is selecting any other value, then the default value 'VALUE1' must not be selected anymore.

Do you know a way to achieve that?

I have already tried with an object dependency that is correctly setting the default value, but that default value still remains when user is selecting other values.

Thank you very much for any help on this.

Best regards,

JF

Accepted Solutions (1)

Accepted Solutions (1)

former_member214775
Contributor
0 Kudos

Hi JF,

you can set the default value for a characteristic value in CT04. There is a checkbox for the characteristic values (column 'D')

Best regards

Tamas

jepi_flanders
Participant
0 Kudos

Hi Tamas,

Thank you for your message.

Values actually are dynamically coming from a function ('Check values with function module'), therefore there is no checkbox for default value.

Thanks again,

JF

former_member214775
Contributor
0 Kudos

Hi JF,

then you can define a procedure like:

$SET_DEFAULT ($SELF, characteristic, 'characteristic value') IF $ROOT.characteristic = ''

The default value can be deselected in CU50 of course.

You can delete the default value with DEL_DEFAULT like:

$DEL_DEFAULT  ($SELF.characteristic)

Best regards

Tamas

jepi_flanders
Participant
0 Kudos

Hi Tamas,

Unfortunately it doesn't work, I believe because it is a multivalue characteristic.

Actually, the code

$SET_DEFAULT ($SELF, characteristic, 'characteristic value') IF $ROOT.characteristic = ''

doesn't set any default value.

To set a default value,I already tried with

$SET_DEFAULT ($SELF, characteristic, 'characteristic value') IF NOT characteristic SPECIFIED

this is setting the default, but then when the user is selecting other values, that default still remains.

Do you have any other idea?

Thanks a lot and best regards,

JF

former_member214775
Contributor
0 Kudos

Hi JF,

then try to add this too:

$SET_DEFAULT($SELF,characteristic, Value1) IF NOT characteristic SPECIFIED

$DEL_DEFAULT($SELF,characteristic, Value1) IF characteristic SPECIFIED

Best regards

Tamas

jepi_flanders
Participant
0 Kudos

Hi Tamas,

Still not working (no default value set), as I think the $DEL_DEFAULT part is at the end removing the default.

But, modifying the above code as follows

.......

$DEL_DEFAULT ( $SELF, characteristic, 'VALUE1' ) IF characteristic SPECIFIED

AND $ROOT.characteristic <> 'VALUE1'

is a little bit better:

  • default is set
  • when user select other values, the default still remains shown
  • user has to delete the default value, the other values are kept
  • removing other values, the default appears again

It's not perfect, but I believe the users will accept this (indeed, changing the default value will not occur so often in the configuration).

So, thank you for your help!

Best regards,

JF

former_member214775
Contributor
0 Kudos

Great I am glad to hear this!:) Appreciate the points!

Answers (0)