Replies: 6 comments
-
[Link to a related post:]#516 Guess I could alter the string with this event ? split the piped string to an array. From Other post :
|
Beta Was this translation helpful? Give feedback.
-
Got it working with the EVENT_STEP_BEFORE_ELEMENT_SAVE I split the piped string of categories from google sheet and match it against crafts categories to get the ids Does not feel like the most efficient solution ( needing to request the categories ) , but it works. If anyone should have a more optimized solution please share Its kinda ugly I know but heres the 'solution' :
|
Beta Was this translation helpful? Give feedback.
-
Thanks @bomanden, does this works also for uploading multiple assets to a field? |
Beta Was this translation helpful? Give feedback.
-
Here's another solution - am using Feed Me 4.3.6. This updates the data in the feed at an earlier stage, using the beforeProcessFeed event and re-presents the feed data in the format Feed Me seems to expect so that you don't have to run any extra queries at a later stage to identify Ids etc. We just identify the columns with delimited data and then update the feed data to add columns for each bit of data that was previously delimited:
If you var_dump the feed data before, you see something like this (COMPANY TYPE is our delimited column):
whereas afterwards you have made it into something like this, and it then imports as you intended:
|
Beta Was this translation helpful? Give feedback.
-
Just a question: have you tried splitting the categories with the separator set for CSV files? For me it was '-|-' and this worked for image filenames, if I remember correctly, so I guess it would work with categories as well. |
Beta Was this translation helpful? Give feedback.
-
Thank, it's work perfect |
Beta Was this translation helpful? Give feedback.
-
Description
Since all cells becomes either text or numbers per default from the GoogleSheet output,
Is there a specific syntax I can use to import multiple categories ,
Tried the following in google cells
( Looks like form the docs that arrays need to be piped, but the json always wraps the output "Onshore|Offshore" as a string )
What I tried as in the cells,
Anyone has a solution/syntax to tell feedme its an array from googlesheets cell data ?
Cheers , Great plugin btw ;)
Steps to reproduce
``
[
"BP",
"Partnerships",
"Onshore|Offshore"
],
"Total",
"Partnerships",
"(Onshore|Offshore)"
],
[
"Shell",
"Partnerships",
"Onshore"|"Offshore"
],
[
"Other",
"Partnerships",
"Onshore,Offshore"
],
``
Additional info
Beta Was this translation helpful? Give feedback.
All reactions