Hello,
I am trying to display a dynamic date in Experience builder in a text string. I need to label a page CURRENTYEAR+1 through CURRENTYEAR+4
I am seeing posts about doing this through the embedded content widget and HTML, but I also found ESRI documentation that they are no longer supporting <string> HTML functions which is what they suggest to get dynamic date
Any ideas?
Hi @PatrickHanley1 ,
You can try using an Expression in the Text widget to add dynamic content.
Hope it helps,
Shengedi
Hi Shengedi,
Unfortunately I dont think that will work, I believe the dynamic content in a text widget only works when referencing a layer. I am not trying to reference any layer, just need a dynamic date of the current year
I need to do the same. Have you ever found a solution to this? Thanks
@PatrickHanley1 and @TimConfare2 I am also trying to do this. Any solutions?
I ended up creating a html file with code for the current date and then embedding it where the text would be. Let me know if you need any more info.
Add a Text widget. Connect to data (any data, it doesn't matter as it won't be used) than select 'Arcade' in the widget popup menu (click on widget on map) and in the 'return' part of the code update value to read value: Year(Now()) This will display the current year.
Use Text(Year(Now()),"#") to remove the thousands separator