Browser not supported

Sorry, the InVision Help Center does not support Internet Explorer. Please download Microsoft Edge or another modern browser.


InVision ambassador ambassador
Sean O'Shea Sean O'Shea

Data > Duplicate not looping through JSON

Whenever I try to use Craft Data with JSON, duplicated content only displays the first value in the JSON. Have tried restarting, updating Craft Manager, and using a different JSON file. What's going on?



0

comments

sort by


Beth Vanderkolk
InVision ambassador Beth Vanderkolk, InVision Employee , ambassador

Hey Sean,


It looks like our Support team will need to take a look at this one for you. I just opened a ticket on your behalf, so keep your eyes peeled for a response! Hope you enjoyed your weekend.


Beth

0

Sean O'Shea
InVision ambassador Sean O'Shea , ambassador

Thank you!

0

Peter Mitts
InVision ambassador Peter Mitts , ambassador

Any news regarding this issue?

Our team needs to populate symbol text overrides with real data from JSON files, so getting this fixed ASAP would be great, to say the least.

0

Beth Vanderkolk
InVision ambassador Beth Vanderkolk, InVision Employee , ambassador

Hi Peter!

I'm opening a ticket on your behalf so that our Support team can chat with you about this. You should receive word back from them soon!

Beth

0

Peter Mitts
InVision ambassador Peter Mitts , ambassador

Thanks Beth, it's appreciated!

0

David Rhodes
InVision ambassador David Rhodes , ambassador Edited

Same issue, now tracking at four months old. Peter, did anyone get back to you?

Thanks much.

0

David Rhodes
InVision ambassador David Rhodes , ambassador

I also need help on removing a JSON object from the CRAFT menu. There doesn't seem to be any documentation on that use case. Thanks again.

0

Shaina Torgerson
InVision ambassador Shaina Torgerson, InVision Employee , ambassador Edited

Hi David,

After doing some testing with our Support team, it seems like duplicating symbols with Craft Data applied will only duplicate one value, rather than duplicating the symbol with different values. 

Currently, the workaround for this is to apply data to the individual layer first, convert the layer(s) to a symbol, and then duplicate the symbol in order to get unique values to appear. While this is not ideal, it will allow you to get around this behavior at the moment.

We have forwarded this over to our Engineering Team for further review and investigation. I will open a ticket on your behalf so that we can keep you updated as we learn more about the matter from them.

Instructions on unlinking content from a JSON object are detailed below. If you've previously linked a layer to a key via the JSON plugin, you can remove that association. To do so:

     1. Select the layer you want to unlink.
     2. Click the Data plugin in Craft, then click the JSON tab.
     3. Browse through the JSON object until you find the previously linked key.
     4. Click the blue x to the left of the associated key to remove the prior association.


I apologize for the inconvenience this may have caused. Let me know if there's anything else we can help you with!

Thanks,

Shaina

-1

Manikanta
InVision ambassador Manikanta , ambassador

Hi Shaina, 

I am using JSON for importing data into my design. My data contains some text variables and images. While duplicating a layer, text variables are coming out unique but the image layers are generating the same image while duplicating. 

I have tried with Custom and web they are working fine, generating unique values while duplicating. But I am facing a problem only with JSON with images.

I have tried workaround trick you suggested 

"Currently, the workaround for this is to apply data to the individual layer first, convert the layer(s) to a symbol, and then duplicate the symbol in order to get unique values to appear. While this is not ideal, it will allow you to get around this behavior at the moment. "

But still not working. Can you please find the reason behind this.

While going through your knowledge base I found this : https://support.invisionapp.com/hc/en-us/articles/115004490023-If-I-duplicate-an-element-that-s-associated-with-JSON-content-will-it-automatically-update-

It says if JSON is deeply nested, duplication might not work properly. Can you find if this issue is resolved.

 

Thanks, 

Manikanta

0

Shaina Torgerson
InVision ambassador Shaina Torgerson, InVision Employee , ambassador

Hi Manikanta,

I apologize for the inconvenience with this issue. Our team is still working on a resolution to this issue, and the workaround I posted is the only solution for now.

However, I would be happy to open a ticket on your behalf so that you are notified once this issue is resolved. Please look for a message from our Support team soon.

Thanks,

Shaina

0

Spencer Varadi
InVision ambassador Spencer Varadi , ambassador

Maybe  secondary workaround I stumbled upon: Using unnamed arrays seems to allow for procedural duplication.

This works:

```

[

{
"ID": 1,
"First Thing": "Heyo",
"Second Thing": "Slam dunk",
"Third Thing": "Obligatory lorem ipsum"
},
{
"ID": 2,
"First Thing": "Yo",
"Second Thing": "Touchdown",
"Third Thing": "Obligatory lorem ipsum again"
}
]

```

But this does not:

```

{
"1": {
"ID": 1,
"First Thing": "Heyo",
"Second Thing": "Slam dunk",
"Third Thing": "Obligatory lorem ipsum"
},
"2": {
"ID": 2,
"First Thing": "Yo",
"Second Thing": "Touchdown",
"Third Thing": "Obligatory lorem ipsum again"
}
}
```

 

0

Shaina Torgerson
InVision ambassador Shaina Torgerson, InVision Employee , ambassador

Hi Spencer,

Thanks so much for sharing this potential workaround with the Community.

This may be information that the Support team would find useful to pass along to Engineering. Would you like me to open a ticket on your behalf to share more information with them?

Thanks again,

Shaina

0

Spencer Varadi
InVision ambassador Spencer Varadi , ambassador

Yes please. This is a fantastic feature I would like to use the way it was intended.

0

Shaina Torgerson
InVision ambassador Shaina Torgerson, InVision Employee , ambassador

Awesome! I will be sure to do that, Spencer. Please look for a message from our Support team soon.

0

Jason Hightman
InVision ambassador Jason Hightman , ambassador

Hello,

I see this thread started several months ago. I'm also having the same issues. In fact my duplicating isn't even working at this time, so I can't even test one of the methods above.

To summarize...

  1. I am trying to map data from a json import to fields on the artboard. I can do this before or after the item is a symbol however, if I do this when it's been converted to a symbol I am having issues with mapping things like an email address.
  2. When I map everything individually first, this works fine but then duplicating seems to be broken so I cannot test if it's working properly.

I work with lots of data and need to be able to fully represent the type of data our users will be dealing with to help us make better decisions. Using Mockaroo to generate the json file is HUGE ... now if only I could get Craft to import and allow me to manipulate it properly :)

More than happy to work closely with the support team to try and finally resolve this. 

 

 

0

Beth Vanderkolk
InVision ambassador Beth Vanderkolk, InVision Employee , ambassador

Hey Jason,

It looks like you opened a ticket with Support, so you should be hearing back soon. Thanks for your patience.

Beth

0

Rob Thwaites
InVision ambassador Rob Thwaites , ambassador Edited

Hi, I am experiencing the same issue. My JSON data is formatted as an array, as Spencer suggests above.

I am importing a local JSON file.

I have attempted to make this work using both Sketch 52.1 & Sketch 51.3. Same issue.

Using the latest Craft Plugins, downloaded and installed today (Craft Manager 1.0.72 (122), Duplicate (1.0.14), Data (1.0.31).

Thanks

Rob

Example from file

[
{
"ANZSCOCode": 1111,
"ANZSCOName": "Chief Executives and Managing Directors",
"Description": "Chief Executives and Managing Directors determine, formulate and review the general policy programs and the overall direction of organisations within the framework established by boards of directors and similar governing bodies.",
"Education": "A Bachelor Degree or higher, or at least 5 years of relevant experience is usually needed to work in this job. Around three in five workers have a university degree.",
"Weekly Pay": "$2,572.00",
"Employment Size": "53,300"
},
{
"ANZSCOCode": 1112,
"ANZSCOName": "General Managers",
"Description": "General Managers plan, organise, direct, control and review the day-to-day operations and major functions of commercial, industrial, government and defence organisations through departmental managers and subordinate executives.",
"Education": "A Bachelor Degree or higher, or at least 5 years of relevant experience is usually needed to work in this job. Around one in two workers have a university degree.",
"Weekly Pay": "$2,250.00",
"Employment Size": "53,000"
}
]

 

 

0

Rob Thwaites
InVision ambassador Rob Thwaites , ambassador

PS I also attempted another method, using the data from https://jsonplaceholder.typicode.com/albums

Same result.

0

Rob Thwaites
InVision ambassador Rob Thwaites , ambassador Edited

From Invision Support - for those who need the help:

"Currently, the workaround for this is to apply data to the individual layer first, convert the layer(s) to a symbol, and then duplicate the symbol in order to get unique values to appear. While this is not ideal, it will allow you to get around this behavior at the moment."

0

Shaina Torgerson
InVision ambassador Shaina Torgerson, InVision Employee , ambassador

Hi Rob,

Thank you very much for reaching out in this Community thread, as well as opening a ticket with our Support team. I'm happy to see that our Support team was able to provide you with a workaround for the time being while our team works on this issue!

Our Support team will be reaching out to you directly once we have any updates on this issue. I will also be sure to add any updates to this Community thread.

Have a wonderful day,

Shaina

0

Alex Peman
InVision ambassador Alex Peman , ambassador

Hi @Shaina,

Same here, I see it such an important feature for the Plugin, any updates about it? Wondering why it hasn't more priority.. and thinking I'm not the only one here...

Thank you very much!

0

Shaina Torgerson
InVision ambassador Shaina Torgerson, InVision Employee , ambassador

Hi Alex,

Sorry to hear that you're also running into this issue!I understand how frustrating it is to wait for a fix to an issue. The Engineering team prioritizes issues based on the scope and impact of the issue. For that reason, we don’t have an immediate fix available, but are still working hard on a resolution.

I will open a ticket on your behalf with our Support team so that that can connect your ticket to the corresponding open issue. This will ensure to keep you in the loop with any updates on this issue.

Currently, the workaround for this is to apply data to the individual layer first, convert the layer(s) to a symbol, and then duplicate the symbol in order to get unique values to appear. While this is not ideal, it will allow you to get around this behavior at the moment.

I’m sorry again for all the trouble and frustration with the Craft Duplicate and Craft Data plugins. Please don't hesitate to reach out if you have any other questions.

Have a great day,

Shaina

-1

Cheramy Jeremy
InVision ambassador Cheramy Jeremy , ambassador

@Shaina,

Hi, It's been 3 months without any news from that topic, I wish I could use that feature, I use Sketch latest version (53).
Can you tell us how things are going by your side?
Is there a way to fill Sketch file with real data without overiding by hand each field?

Hoping to have an answer.

 

0

Shaina Torgerson
InVision ambassador Shaina Torgerson, InVision Employee , ambassador

Hi Cheramy,

It appears as if our Support and Engineering teams are still hard at work on this issue. I apologize for not having a more detailed update at this time. 

Part of my job is to take important threads from Community to meetings with relevant Product Managers to discuss the struggles our customers are having. I will be sure to raise your concerns and request in my next meeting with this PM. I’m also opening a ticket on your behalf so that you can stay up to date on the status of this feature request. Please look for a message from our Support team soon.

As a workaround, you can first duplicate the shapes without an image fill and once you've duplicated the image, you can go in and select each layer, then mass apply Unsplash images to it. Here's a screen recording displaying this workaround. Hope this helps!

Thanks for your patience,

Shaina

0

join the conversation

to comment, sign up or sign in.