Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using "Condition" clauses with XML

Status
Not open for further replies.

stavae

Programmer
Sep 7, 2009
8
FI

I need some Help with creating XML "Condition" Clauses.

I'm new to XML, so I'm not quite versatile.

What I need to do is : create a "Condition" which will trigger the execution of another XML code (or another portion of the same XML script)

Example : let's say that I have a list (Dropdown Menu). When the user selects a particular option from the menu, it will trigger another portion of the same XML script, or simply execute another XML code altogether.

How do I do this in XML?

Should it be : "......If (fieldname)='value' then......"

or something like that.


Thanks

 
Have unsurmountable difficulty in understanding the question as the vocabulary used is so alien to xml. (Also like your previous few threads.) It could be xhtml with javascript functionality used? I don't know. What book are you following? or maybe you can try javascript forum:
If you cannot communicate your problem for us mortals, it would be hard for anybody to help you. Maybe show you code of what you've done to some sufficient extent for people to determine where the best should you post the question to?
 
If I wanted JAVAscript forum, I would have gone there in the first place.

Let me see if I can explain this more clearly.

Take the following code, for example :



PART ONE :

<Field name='global.mechanicalkeyrequest'>
<Display class='Select' action='true'>
<Property name='title' value='Mechanical Key Request'/>
<Property name='allowedValues'>
<List>
<String>Assigned</String>
<String>Not Assigned</String>
</List>
</Property>
</Display>
</Field>

PART TWO:

<Field name='global.mechanicalkeynumber'>
<Display class='Text'>
<Property name='title' value='Mechanical Key
Number(s)'/>
<Property name='size' value='80'/>
<Property name='maxLength' value='40'/>
</Display>
</Field>


The "PART ONE", as can be seen, is where the selection is made, as to whether or not a Mechanical Key has been assigned to a particular user.

The PART TWO is where the Mechanical Key Number is entered.

Here's the thing : I want the PART TWO to show on my screen ONLY if the value "Assigned" is chosen from PART ONE.

If a mechanical key has NOT been assigned, then there is no need for the field "Mechanical Key Number"

 
I'm with tsuji: you don't explain your problem. I can see the files but I still don't understand what you mean with "show in my screen" or "number entered"

Entered where? Who displays the XML in the screen?

Cheers,
Dian
 
this sounds familar to me, only because i wrote a vb.net gui which was driven by a custom xml file defining what controls to show to a user and what these controls should contain and whats more what should happen when the user selects different controls or enters data (in efftect it only pumped out properties which the user was assigning to a server or system being provisioned but thats not the point i guess)

to cut a long story short stavae, no one will have a clue as to how you can amend you xml to serve your purpose....unless you tell us which application you are using (in which case i am sure you will be directed to a different forum for that app, or you will be asked to read the manual), but, if that application was written by you and you have the source code, then depending on the source code type you will again be directed to a different forum.

i hope that is ok?

p.s. the users of the gui i wrote then started asking me to do stuff with each of the controls so that each controls behavour depended on each other and the users selections, i scratched my head and told them no, i had exhausted the benefit of the data driven gui and would be better to write the interaction in native / normal vb.net control manipulation thing. saying all that perhaps MS's appplication XML which is rolled up with Windows Workflow does all that now (i must admit i bet them to it)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top