Philip
Philip

Reputation: 621

How do you format the xpath value in WP ALL IMPORT for select advanced custom fields?

I have a select field for an advanced custom fields field. It is a dropdown of all the states. I am trying to import a spreadsheet, for which one of the columns is states. What I would like to do is set the value of the select field to be the value of the state in the following xml code:

<node>
 <id>1</id>
 <school>Samford University</school>
 <urlvalue>http://samford.edu/arts/music</urlvalue>
 <streetaddress1>800 Lakeshore Drive</streetaddress1>
 <streetaddress2></streetaddress2>
 <city>Birmingham</city>
 <state>AL</state>
 <country>United States</country>
 <zip>35229</zip>
</node>

In the WP ALL IMPORT tool, you have the option to set this value using XPath, however I am not sure how to structure this. I have tried the following:

enter image description here

This does not work however and I am left with a broken import.

Upvotes: 2

Views: 2456

Answers (1)

Adrian Cobo
Adrian Cobo

Reputation: 173

Try with {country[0]}? When I'm trying on my project this is how I have done.

Upvotes: 1

Related Questions