Look-up name value from XML file based on user entered number value
My form has an "Employee Number" numeric field and an "Employee Name" textfield. I want the user to enter their employee number and have JavaScript that will "look-up" that employee number in the XML data file and return the corresponding Employee Name into the employee name textfield. I need an example XML data file and form with the appropriate script.
Can anyone help me with this?
Hi ,
Re-read your post, find that the col2 in List1 is people and group type column, SharePoint Lookup type column showing additional fileds option does not support people and group type column, so there should be no OOB method to achieve your
goal.
http://techtrainingnotes.blogspot.com/2012/01/sharepoint-not-all-column-types-can-be.html
I think you can try using InfoPath form to manipulate the correspond col2 value when lookup col1 from List1 then show in list view, or may use custom visual web part to achieve you goal.
http://sharepointsolutions.com/sharepoint-help/blog/2011/11/get-infopath-to-display-lookup-column-value-not-id/
Thanks
Daniel Yang
TechNet Community Support
Similar Messages
-
How to retrieve value from xml file
hi all,
can somebody pls tell me how to retrieve value from xml file using SAXParser.
I want to retrieve value of only one tag and have to perform some validation with that value.
it's urgent .
pls help me out
thnx in adv.
rituhi shanu,
the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
pls have a look at the following code snippet.
public class XMLValidator {
static ArrayList strXXX = new ArrayList();
public void validate(){
factory.setValidating(true);
parser = factory.newSAXParser();
//all factory code is here only
parser.parse(xmlURI, new XMLErrorHandler());
public void setXXX(String pstrXXX){
strUpn.add(pstrXXX);
public ArrayList getXXX(){
return strXXX;
class XMLErrorHandler extends DefaultHandler {
String tagName = "";
String tagValue = "";
String applicationRefNo = "";
String XXXValue ="";
String XXXNo = "";
XMLValidator objXmlValidator = new XMLValidator();
public void startElement(String uri, String name, String qName, Attributes atts) {
tagName = qName;
public void characters(char ch[], int start, int length) {
if ("Reference".equals(tagName)) {
tagValue = new String(ch, start, length).trim();
if (tagValue.length() > 0) {
RefNo = new String(ch, start, length);
if ("XXX".equals(tagName)) {
XXXValue = new String(ch, start, length).trim();
if (XXXValue.length() > 0) {
XXXNo = new String(ch, start, length);
public void endElement(String uri, String localName, String qName) throws SAXException {
if(qName.equalsIgnoreCase("XXX")) {
objXmlValidator.setXXX(XXXNo);
thnx & Regards,
ritu -
Question about insert date value from xml file
I want insert value into table from xml file. Every time I inserted value of date type into the table, I got the unpasable error message as following:
oracle.xml.sql.OracleXMLSQLException: Exception 'java.text.ParseException:Unpars
eable date: "2000-04-19 00:00:00.0"' encountered during processing ROW element
Thanks for anyone that can fix my problem or give me any suggestion.
email: [email protected]<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by matmnwx:
I want insert value into table from xml file. Every time I inserted value of date type into the table, I got the unpasable error message as following:
oracle.xml.sql.OracleXMLSQLException: Exception 'java.text.ParseException:Unpars
eable date: "2000-04-19 00:00:00.0"' encountered during processing ROW element
Thanks for anyone that can fix my problem or give me any suggestion.
email: [email protected]<HR></BLOCKQUOTE>
Use:
OracleXMLSave sav = new OracleXMLSave(conn,tabName);
sav.setDateFormat(<hier the date format in the XML-File>); -
How to get the values from xml file to java combo box
Hi frens,
I am new to java and xml programming,
Now, i want to have a code of getting the tag values from the xml file
into the swing combo box of java front end.
How can we do that?
any help of code or tutorial or an ebook is a great help for me.
Thank you,
Karthik.
Edited by: Karthik84 on Aug 27, 2008 1:49 AM
Edited by: Karthik84 on Aug 27, 2008 11:29 PMlook at this link
http://www.stylusstudio.com/docs/v2006/d_help30.html
I read sometime back that castor has a tool to do
conversion. You might have a look into casto as well. -
Want to retrieve null value from xml?
i m writing this code to get the tag name and values from xml file.
Now the problem is that
if my xml file contain any tag whose value is not defined like
<root>
<firsttag>first</firsttag>
<Second></Second><Third>third</Third>
</root>
Now look if second tag doesnt contain anything ,then i want to add "null" to vector,but it throws null pointer exception because second tag is empty.
Vector<String> CSWFinfo = new Vector<String>();
try {
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(new File(xml));
Element root = doc.getDocumentElement();
NodeList node = root.getChildNodes();
for (int i = 0; i < node.getLength(); i++) {
Node currentNode = node.item(i);
if (isTextNode(currentNode))
continue;
CSWFinfo.addElement(currentNode.getNodeName());
if (null != currentNode.getFirstChild().getNodeValue()) {
CSWFinfo.addElement(currentNode.getFirstChild()
.getNodeValue());
} else {
CSWFinfo.addElement("null");
}//end of for loop block
System.out.println(CSWFinfo);
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
}I am using dom parser .
Can any one know how to do it????
Edited by: chauhan2003 on 16 Jun, 2008 12:06 PMAre you sure that all currentNode have a firstChild ????
If your node has no value, it has no child
So i 'd change code to like look something like:
if (currentNode.getFirstChild() != null) {
CSWFinfo.addElement(currentNode.getFirstChild().getNodeValue());
} else {
CSWFinfo.addElement("null");
} -
How to retrieve image from XML file
Hi All,
I am new to XML. So any best guidance is appreciated.
The application requirement is to display image retrived from uploaded xml file in file upload section of our application. And store that image in database.
In my XML file , images & strings & numbers & booleans are there . I am able to save everything in database except images .
I am using JSF, Seam & Hibernate combination. In my Hibernate entity class i took BLOB datatype for image.
I am using following tags in my Xhtml file to display image
<s:graphicImage value="#{hibernateentitybean.picBlobtype}" height="200" width="200">
<s:transformImageSize width="200" height="200" />
<s:transformImageType contentType="image/jpeg"/>
But image is not displayed in Xhtml file
I am using org.w3c.dom.Document for retrieving node name & corresponding value in that node in XML file.
I am getting code like below for Image when i am logging all values from XML files in my bean class .
x0lGQRQAAAABAAAAAAAAAFJHAQARAAAAVwBhAHQAZQByACAAbABpAGwAaQBlAHMALgBqAHAAZwAAAP/Y/+AAEEpGSUYAAQIBAGAAYAAA/+0YLl
I want to convert this value to image. So i can convert image to bytes and store in BLOB.
Can anyone guide me ? or any other approach .
Thanks in advance for any reply.
Regards,
NareshDan_Koldyr wrote:
agree, it's really odd. Just reread OP and it says:
NareshDharmiVatsal wrote:
want to convert this value to image. In any case it doesn't get worth then another single code line:
final String cdata = "x0lGQRQAAAABAAAAAAAAAFJHAQARAAAAVwBhAHQAZQByACAAbABpAGwAaQBlAHMALgBqAHAAZwAAAP/Y/+AAEEpGSUYAAQIBAGAAYAAA/+0YLl";
final sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
final byte[] data = decoder.decodeBuffer(cdata);
Blob blob = new SerialBlob(data);//or what ever other DB-specific blob implementaiton Did i answered original question? Any more comments to my first replay?I can comment on this latest code. The package sun.misc is private to Sun (Oracle now of course). It is undocumented and may change or be removed altogether in a future release. There is a good free open source Base64 decoder in the Jakarta Commons Codec library. -
Passing Parameters from XML file to Java Application
Can any one help me to know the way of passing values from XML file to Java Application..
Thanx in advanceWith the Processing Instructions <?name pidata?>
Get the Nodes in a Document.
Node node;
if(node.getNodeType()==Node.PROCESSING_INSTRUCTION_NODE)
//String param=node.getData(); -
1.6 Dynamic Photo Gallery - alt and title attributes from xml file?
Hi!
I would like to attach information to my gallery images from
the XML-file used by the gallery.
Especially the alt and title attributes for the "img
id="mainImage"-tag would add a bit more user friendliness.
I found
this
example about adding caption to images very help full and
everything worked just fine, thanks to clear information!
(http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=602&threadi d=1306782&enterthread=y)
Could someone come up with an example of adding title/alt
attributes values from XML file?
I'm sure there are quite a few out ther who would like to see
a solution to this ;)You need to add your info to the XML.
So something like:
<photo
path = "travel_01.jpg"
width = "263"
height = "350"
title="my title"
alt_text="Alt Text"
thumbpath = "travel_01.jpg"
thumbwidth = "56"
thumbheight = "75">
</photo>
Then in your detailregion:
<img src="{dsData::large/@base}{@path}" alt="{@alt_text}
title="{@title}" />
I am using
http://www.adobe.com/devnet/dreamweaver/articles/spry_photo_album.html
as the source of my samples...
So, just add the data to the XML and then you will have these
attributes available as data references.
Hope this helps.
Don -
Reading from XML file is too slow
I am trying to read some values from XML file, it takes about 1 or 2 minutes to finish reading, my xml file has about 4000 xml elements. Does anyone know this is normal or something wrong? How could make it faster?
Thank youfine if it helps others... i hope NI will not be angry *fg*
thx for your bug-report, i do not test the sub.vi until now.
exchange the OR with an AND, solves the problem with the endless-loop, but error checking will not work (the loop only stops if no error AND no start-tag is found)
changing the loop termination condition and putting the NOT from the error condition to the no_starttag_flag do both. correctly stops the loop when error occurs OR no further elements found.
i attached the new sub.vi for version 7.0 and 7.1, also but some colors in the logo, for your convinience
catweazle
Attachments:
xmlFile_GetElements_(Array).vi 76 KB
xmlFile_GetElements_(Array).vi 65 KB -
XML parser for fatching multiple values from XML
Hi,
In my scenirio i have to facth multiple values from XML file and then set in to Table in webdynpro...
Fo example my xml has values like...
<xml>
<item>
<item1>
<quantity>
100
</quantity>
<price>
50
</price>
</item1>
<item2>
<quantity>
200
</quantity>
<price>
20
</price>
</item2>
<item3>
<quantity>
300
</quantity>
<price>
10
</price>
</item3>
</item>
</xml>
then i have to fcath those quantity and price and set in to table...
How to do taht in webdynpro and does any one have parser code for retriving multiple values...Hi,
1) You need to use JDOM parser.
2) The code for parsing XML using JDOM parser is readily available if you search on google.
3) You will have to check the attribute during every parsing and then if attribute is quantity you can fetch the corresponding tags.
4) Something similar to this:
org.jdom.Document document = parser.build(file);
org.jdom.Element rootElement = document.getRootElement();
org.jdom.Element childElement = rootElement.getChild("file");
Element xmlElement = childElement.getChild("item");
if (xmlElement != null) {
List itemElementsList = xmlElement.getChildren("item1");
if (itemElementsList != null) {
Iterator iterator3 = itemElementsList.iterator();
while (iterator3.hasNext()) {
//For each group get quantity
Element itemElement = (Element) iterator3.next();
List quantityElementsList =
itemElement.getChildren("quantity");
if (quantityElementsList != null) {
Iterator iterator2 =
quantityElementsList.iterator();
while (iterator2.hasNext()) {
// Your code
You might need to make some changes as per your rquirement. Just use this sample to understand how you need to parse the xml
Hope it helps.
Regards.
Rajat
Edited by: Rajat Jain on Jan 22, 2009 9:51 AM -
Hi all :
I try to read Boolean value from xml file , please see attach file , all the time this error rise
I know that The XML tag describing the type of data does not match, how can I get Boolean value " 1" or "0 "
Thanks
wisam
Attachments:
untitled1.JPG 115 KBYou are not trying to read boolean.. you are trying to read a DBL.
To read a DBL you must first write a DBL to XML.
To read a boolean replace the DBL with a boolean -
Dynamically create Value Objects from XML file
Hi
I want to create a value object from Xml file dynamically,like in the xml file i have the name of the variable and the datatype of the variable.is it possible do that,if so how.Read about apache's Digester tool. This is part of the Jakartha project. This tool helps in creating java objects from the XML files. I am not sure, if that is what u r looking for.
-
How to make iTunes read the song's name/singer from the file's name itself?
Hi everyone,
So I have this file with songs from everywhere. I spent quite some time now to make sure that the structure of each file's name is as such : "Singer - Song name", hoping that everything would be read by iTunes accordingly. However, either iTunes read it well, or it didn't read it at all ("Singer - Song name" appearing in Title alone), or iTunes read the "media" of the file (ie. what the guy I downloaded it from wrote for it in the Preferences, which usually is in capital letters or with a bunch of weird underscores). As I'm OCD and need everything to be neat, I'm highly tensed right now. I really want everything to be neat and clear!
So, how do I make sure that iTunes reads the files' names such that it knows the structure is "Singer - Song name"? Thanks.iTunes doesn't use file names to determine how music appears in your library, Rather, it uses metadata that is split between:
data elements that are embedded within the media files
data elements that are included in the entries in the iTunes database
No amount of reorganization, renaming or other manipulation at the file level will make any difference to how songs will appear in iTunes. Using your example:
the value of the track number element is 1
the value of the artist element is "Elvis Presley"
the value of the song name element is "Blue Suede Shoes"
Depending on how you configure iTunes then the file name is either:
completely independent of iTunes (i.,e., the file containing this song could be xyz.mp3)
dependent on the metadata managed by iTunes, (i.e., when you have these two options set:
then iTunes will set the file name to be 1-01 Blue Suede Shoes.mp3 where:
the file is in a folder called "Elvis Presley" (the name of the album)
that folder is in one called "Elvis Presley" (the name of the artist) which is in iTunes Media\Music
Going back to your question "How to make iTunes read the song's name/singer from the file's name" the answer is simple - you can't, as this is not how iTunes works. There are some third-party utilities that you can use to set some metadata element values based on parsing of file names which might be a useful first step. However, to use iTunes effectively you should really forget about / ignore file names - manage your media using appropriate metadata and allow iTunes to look after file names behind the scenes. -
How to show records from xml file
HI All
I have created one region its actually search region
which having 5 items and result table region
I want to search records based on that 5 items and want to show output in table
I have table name as hr_api_transactions which contains lot of columns
and that table also contain one column
name as TRANSACTION_DOCUMENT of type CLOB()
that columns xml files for each record
I want to extract data from that xml file and want to display.I have created one region on seeded page
in that region I have created one table for output
that region is search region
which having 5 items of textfield and 2 items of type submit button
GO and Clear
I want to search based on that 5 items
I want to display records in table that I have created on that region
I have one seeded table
that contain one column
that column contain xml file for each individual records
that xaml file contains values what I want to display
MY problems are
how can I extract data from xml file?
how can I show all values for each records on that table?
how can I search based on that 5 items?
now I am able to find out single value from that XML file
by using SQL command
select xmltype(transaction_document).extract('//IrcPostingContentsVlEORow/CreationDate/text()').getStringVal() CreationDate
from hr_api_transactions
where transaction_ref_table = 'PER_ALL_VACANCIES'
and transaction_ref_id = 4693;how can I extract more than one records from that XML file -
How to delete a perticular node from xml file using java code
Hii All,
Now i am trying to delete a perticular node from xml file.Like...
XML file:
<Licence>
<SERVER>
<was id="1">1</was>
<was id="2">2</was>
</SERVER>
</LICENCE>
I am working in messaging service using JABBER framework with whiteboard facility.
Here Some commands i have created to add,modify,delete nodes from xml file.They Are
1.If u want to add a new node then.
create Licence.SERVER <ss id="3">ddd</ss> lic.xml
(here u want to add a new node called "ss" under Licence.SERVER.
And lic.xml is tyhe xml file name where it was saved.
2.If u want to delete a node(Suppose <was id="1">),then the command should be
delete Licence.SERVER.was:id='"1" lic.xml
A problem arises that here it find two was attributes.And it delete the last was attribute,not the requested node.
PLEASE HELP ME IN SOLVING THIS CODE..
------------------------------------Looks like you clicked on "Post" before you pasted in the code you were talking about.
Maybe you are looking for
-
Hi Machine/OS: SGI VWS 540, 256MB RAM, Win2000 Oracle: Oracle 8i (8.1.6)/Enterprise Edition Release 2 Problem: I want to bind to a CORBA object (pureCORBA bank example) from c++. I found in the FAQ an article about the interoperability with c++. I do
-
Vendor Payment term Datasource
Hi I have requirement to extract SAP vendor payment terms master data to BW. can you pls help me with right datasource for this. Which datasouce needs to used to extract vendor payment term. In SAP, we can use via SAP is FK03 transaction. Regards, An
-
How do I open 3D in my Photoshop CS6?
I purchased 11/2 years ago. and I am trying to find 3D in the program, But can't seem to find it. Please help
-
Import quality issue with AVC/H.264 and workaround
When I import from my Sanyo Xacti HD700 using "Import from Camera..." the import quality has significant blocking / compression artifacts. However, if I copy the same file off the SD card from the camera and play it back in QTplayer it does not have
-
I am rying to modify an existing project by adding new pictures, i can drag them fine into the project, but in reality they appear as a black space later, looks like the project rejects them. Any idea?