Hello,
I'm trying to assign constraints to certain nodes, and I'm using dependencies inside of the values field. the problem is that, when I successfully assign the first constraint and I'm assigning a property to the second node the first group node takes the values of the last group. I'm pretty sure that the problem is inside of the "node" in the dependencies field because the values are "global". How can I assign those properties to just one node, what should I add to the dependencies field to refer to the auto group that is created and not to the values of all of the groups.
Thank you.
<condition n='asig_restriccion' pn='Asignar restriccion' ov='point' >
<value n='cond_rest_y' pn='Restriccion en "y"' values='ninguno,valor' v='ninguno'>
<dependencies value='ninguno' node='//value[@n="ind_y"]' att1="v" v1="0"/>
<dependencies value='ninguno' node='//value[@n="rest_y"]' att1="state" v1="hidden" att2='v' v2='0'/>
<dependencies value='valor' node='//value[@n="ind_y"]' att1="v" v1="1"/>
<dependencies value='valor' node='//value[@n="rest_y"]' att1="state" v1="normal" att2='v' v2='0'/>
</value>
<value n='ind_y' pn='Indicador y' state='hidden'/>
<value n='rest_y' pn='y' state='hidden' />
</condition>
condition in Spd
Moderator: GiD Team
Re: condition in Spd
Hi @dsvivas
what you want is achieved with
As you can see
This should be replaced by
Hope it works!
Javi Gárate
what you want is achieved with
Code: Select all
<condition n='asig_restriccion' pn='Asignar restriccion' ov='point' >
<value n='cond_rest_y' pn='Restriccion en "y"' values='ninguno,valor' v='ninguno'>
<dependencies value='ninguno' node='../value[@n="ind_y"]' att1="v" v1="0"/>
<dependencies value='ninguno' node='../value[@n="rest_y"]' att1="state" v1="hidden" att2='v' v2='0'/>
<dependencies value='valor' node='../value[@n="ind_y"]' att1="v" v1="1"/>
<dependencies value='valor' node='../value[@n="rest_y"]' att1="state" v1="normal" att2='v' v2='0'/>
</value>
<value n='ind_y' pn='Indicador y' state='hidden'/>
<value n='rest_y' pn='y' state='hidden' />
</condition>
referred to "All 'values' in the xml whose 'n' field equals to 'rest_y'".´node='//value[@n="rest_y"]'
This should be replaced by
that means "All values following the local path -from the current node, go to parent (..) and find values whose field n equals to rest_y"node='../value[@n="rest_y"]'
Hope it works!
Javi Gárate
Re: condition in Spd
Thank you very much Javi!!!!! I tried a lot of things and nothing worked, this completely solve the problem!
Regards.
Regards.
Re: condition in Spd
An advice (not related to your question).
Use english messages everywhere in the code,
E.g instead
pn='Restriccion en "y"''
Use
Pn='Y restriction'
And to be show in other language, like Spanish use our program "RamTranslator" https://www.gidhome.com/gid-plus/tools/ ... translator
that scan the code and extract the strings to translate in a table. Translate them and export the message catalog, es.msg and copy it to the problemtype to show its own messages in the current GiD selected language
Use english messages everywhere in the code,
E.g instead
pn='Restriccion en "y"''
Use
Pn='Y restriction'
And to be show in other language, like Spanish use our program "RamTranslator" https://www.gidhome.com/gid-plus/tools/ ... translator
that scan the code and extract the strings to translate in a table. Translate them and export the message catalog, es.msg and copy it to the problemtype to show its own messages in the current GiD selected language
Re: condition in Spd
Hi @escolano, I'll take your advice.
Thank you!
Thank you!