Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi everyone!
I have a problem with mashup parameters.
More in detail, I have configured a system where the mashups have a bidirectional numeric parameter: at the beginning it is 0, then a service is executed that takes it as input, and if it is 0 it updates it by modifying the mashup parameter.
But when the page is reloaded, the parameter returns to 0.
Why?
Is there a way to 'initialize' and make sure it doesn't reset on every refresh?
Thanks
Hi @GM_9528891,
Indeed by default Mashup Parameters are reset at mashup reload. Have you tried using (persistent) Session Parameters instead ?
what i want to achieve is a sort of id of the mashup, do you have any suggestion? i'm sure that every thing have an identifier, so the mashup(in my case a gadget) have too.
As far as I am aware mashup do not have IDs out of the box (nothing of the sort displayed in XML when exporting a mashup) and cannot be assigned custom properties, only parameters.
You could maybe use the "Description" property of your mashups, which is persisted into the database. Its value can be set and retrieved programmatically using the services SetDescription and GetDescription available on Mashup entities.
Hi @GM_9528891.
If one of the previous responses helped you to resolve your issue, please mark the appropriate one as the Accepted Solution for the benefit of others with the same problem.
Regards.
--Sharon
As other responses have alluded, you need to determine a way to persist the data you want to show up after reloading the page. This could be saving it to a session parameter (as @c_lowy mentioned), a Thing Property, a Data Table, or somewhere else. It partially depends on the scope of the data: who should see the value when the mashup is loaded? If it's universal, I'd go with persistence via Thing property. If each user should have their own value, I'd go with a session parameter.
I'm currently investigating Dashboards/Gadgets which appear to be able to save parameters once you add a gadget to the dashboard. I haven't quite figured out how to change the parameters once the gadget is added to the dashboard, but I think I'll have to use some Services in the Resource "DashboardFunctions."