2

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.

Philip
  • 569
  • 2
  • 5
  • 27

1 Answers1

1

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

Bugs
  • 4,491
  • 9
  • 32
  • 41
Adrian Cobo
  • 163
  • 1
  • 10
  • I think 0 is wrong index number `wpallimports` and `xpath` both start with index 1. So the valid syntax should be `{country[1]}`. – Imran Zahoor Jul 19 '19 at 12:43