Passing dataset from perspective view to WebDev

I’m trying to create a module in WebDev that takes a dataset and a few other parameters then it does something with it and creates HTML that viewed in an iFrame. I tried converting it to a string and passing it in the url, but I’m getting an error that says the url is too long. I know back when when I was making node modules, there were several other ways to pass data to APIs, but I’m not sure how to do that in Ignition.

It depends of the source of that dataset. I would try to put the dataset in a tag, then reading the value from WebDev is trivial.

I’m not clear of your implementation but also, you should implement a http calls with the dataset encoded as Json in the body.

Need more info for this one.

I don’t understand why the source would matter, but in this case, it would be a database. Storing it in a tag is not optimal since I want to be able to make custom JS based components with it. I’m okay with converting it to JSON, but I’m not sure how to pass it into the body.

How do I do that.

the last example sends an xml in text form, so you an do the same for json, just set the type to application/json or text/json instead of text/xml

1 Like