on 04-08-2014 9:21 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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:
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
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.