Skip to main content
Nintex Community Menu Bar
Question

__skuid_record__.row causes JSON.stringify circular structure error on REST model PUT operation for

  • July 11, 2024
  • 8 replies
  • 0 views
  • Translate

Forum|alt.badge.img+18

10.0.25

REST model on the bitbucket API.

I’m trying to update a record’s Assignee on an issue.

I have the assignee field set up as a reference field like so:

I’m rendering the actual assignee field in a field editor as a picklist, and using a Model to generate the picklist options:

The source model is on bitbucket’s team members.

For some reason with this setup, skuid is including the __skuid_record__ object in the row’s changes, which creates circular reference issues when calling JSON.stringify() as part of the REST save operation:

Here’s the code that’s producing the error:

Skuid never actually gets to the point of trying to perform the PUT.

Help?

Is there a better way for me to set this up?

Did this topic help you find an answer to your question?

8 replies

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

Attempting to use the “Automatic” option source fails, because for some reason skuid is interpreting the assignee field from bitbucket as a string rather than as an object:

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

Interestingly, a different model on the same page, with the same source (this one read only to create a list), shows the assignee field as an object:

That’s what I need for the model in the OP! How can I get skuid to re-interpret or fetch new metadata for my model so that it correctly understands that assignee is actually an object and not a string?

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

Ah, looks like the Composer Settings field on the Page object is what I needed!

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

Well, having the assignee field as an object instead of text is nice, but it’s not getting me anywhere.

Any guidance on setting up a reference field for a REST model like this?

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

Well, look like if I just set the assignee.username field to render as a picklist, with my Team Members model as a picklist options source, things seem to work out just fine.

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

It would still be nice to know how to actually set up a reference field on a REST model like this.

Translate

Forum|alt.badge.img+11

Matt~

Sounds like you were able to answer your own question eventually? Just want to confirm you’re all set. We will bring this idea up with our documentation team. 

Thanks!
Karen 

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

I’ve got it working now after a lot of trial and error. it would be great if skuid could document reference fields for rest models more thoroughly, and explain the circular JSON error I described.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings