Skip to main content
Question

Dynamically changing URL in reader

  • November 5, 2024
  • 2 replies
  • 39 views

ben09lore
Contributor
Forum|alt.badge.img+1

Hi,

I have an URL that I’d like to read in, but it contains the current date and thus is being updated everyday. 

How may I change the URL within the reader so that it’s automatically up-to-date?

I’ve tried define a user parameter as a URL but I don’t manage to make it dynamic there. I thought I could replace the date e.g. 2024-11-05 with @DateTimeFormat(@DateTimeNow(),%Y-%m-%d) in the Default Value URL but it doesn’t work.

Any help appreciated!

 

2 replies

geomancer
Evangelist
Forum|alt.badge.img+59
  • Evangelist
  • November 5, 2024

You can create the URL in an attribute, and use that attribute in your HTTPCaller.

The attribute MyURL in this example is defined as

https://this.is.nonsense/The_Page_@DateTimeFormat(@DateTimeNow(),%Y-%m-%d)


ben09lore
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • November 5, 2024

Thank you, that was a simple and efficient fix.