Message Boards Message Boards

Displaying Databin as a Dataset table in a FormFunction Cloud Deployment

Posted 6 years ago
POSTED BY: Ben Kickert
3 Replies
Posted 6 years ago

The more I look into this, the more I think it may be a bug instead of a coding issue. The reason being is that if I include the exact same code as above without using CloudDeploy in Mathematica, the result displays as expected with a Dataset table showing the databin contents. Furthermore, if I use the following code to simply CloudDeploy a Databin formatted as a Dataset, it also shows correctly.

CloudDeploy[Dataset[Databin["uI5TknW0"]]]

I just don't understand what would cause such a discrepancy with a CloudDeploy.

POSTED BY: Ben Kickert
Posted 6 years ago

After much trial and error, and eventually guidance from a kind soul on StackExchange, I was finally able to troubleshoot the problem. The fix was to use ExportForm to deploy it as a CloudCDF. I initially avoided this option because I thought it would require a CDF player installation for users. Here is the final working code:

CloudDeploy[
 FormFunction[{"Databin ID:" -> <|
     "Help" -> "Enter the ID of a public Databin", 
     "Interpreter" -> "String"|>, }, 
  ExportForm[Dataset[Databin[#"Databin ID:"]],"CloudCDF"] &], Permissions -> "Public"]

Still not sure why that option has to be set, but it is great to now know the fix.

POSTED BY: Ben Kickert
Posted 2 years ago

Hi Ben,

I don't know if you're still around but I thought I'd ask since I have a similar question.

If I want to deploy a form that takes one of the values (e.g., ID) in a databin as input and returns a dataset that contains the value. So your example took the databin identifier and return the whole dataset but I'd like the form to return a dataset of the input. Hope this makes sense and hope I could hear back..!

POSTED BY: Jack Oh
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract