I have created a mobile app using ExB and I'd like to know if it's possible to show todays date. I haven't been able to find a widget that can do this.
Here's some more context... I would like the app to display the moon phase. In my region, the moon phase changes each day therefore I'm anticipating something like: a widget for the date, and an associated feature layer that would show the moon phase depending on the current day. I would happily create a feature layer containing 5+ years worth of moon phases and days because this would be fairly easy. After that, I'm not sure how to implement it in ExB (or if it's actually possible).
p.s. I'm not a developer so keen to stay away from coding unless the solution is simple.
Any ideas or suggestions welcome!
Solved! Go to Solution.
Edited my original reply, sorry i thought this was referring to a different query.
@KrystalPhaneuf4 I ended up pursuing a different way to get the data I wanted to display. I didn't need HTML, instead I set up a definition query on the layer to show todays date. You can do this when adding a data connection and then specifying parameters.
It is also possible to use the embed widget to embed a dashboard url.
In the dashboard, use the list element.
On the Data tab, connect it to a dummy layer.
In the List tab, write this code in the 'Advanced formatting' box:
var time = Now()
return {
attributes: {
attribute1: time,
}
}
In the line item template box, write this code after clicking the 'source' button:
<p><span style="color:#ffffff">{expression/attribute1}</span></p>
Hi @FrankHerbert - the upcoming Timeline widget (see Experience Builder 2022 Roadmap And Beyond) might cover what you want to achieve here.
Besides, there are some related posts you might find helpful:
- Is there a Time Slider Widget for Experience Builder?
Also, if possible, feel free to share your data with me via DM so that I can get a better idea of the data structure that your case needs.
Thanks,
Tonghui
Hi @TonghuiMing thank you for your message.
I'm happy adding a dynamic date field (using embed widget) for now. I hope the new additions this year will help me to develop it to show the moon phase as well. I will DM you today with more info on the mobile app.
Thanks, Sam
@FrankHerbert do you mind sharing your HTML for how you were able to embed the dynamic date?
Edited my original reply, sorry i thought this was referring to a different query.
@KrystalPhaneuf4 I ended up pursuing a different way to get the data I wanted to display. I didn't need HTML, instead I set up a definition query on the layer to show todays date. You can do this when adding a data connection and then specifying parameters.
It is also possible to use the embed widget to embed a dashboard url.
In the dashboard, use the list element.
On the Data tab, connect it to a dummy layer.
In the List tab, write this code in the 'Advanced formatting' box:
var time = Now()
return {
attributes: {
attribute1: time,
}
}
In the line item template box, write this code after clicking the 'source' button:
<p><span style="color:#ffffff">{expression/attribute1}</span></p>