Hi some help please.
I have a button that when clicked will open a website - I want the URL to have dynamic element based on the table below. So, if today's date was (2021-05-21) it would mean the url would be "HTTPS://WEBSITE/2021-05-20" until the next date range was reached.
The Table would be a list in SP, imported as a collection into the app - so as the years pass the dates would change, so solution needs to be dynamic and not require having to change code in app each month/year.
I have some ideas - but want it to be as simple as possible.
Effective Date - YYYY-MM-DD |
2021-01-28 |
2021-02-25 |
2021-03-25 |
2021-04-22 |
2021-05-20 |
2021-06-17 |
2021-07-15 |
2021-08-12 |
And so on table as values for 2 years |
Solved! Go to Solution.
HI @JC75NATS ,
I did a test for you.
1\ This is my sharepoint list.
2\ Add a button control and set its onselect property to:
Clear(Col);ForAll(Sequence(CountRows(LIST169.Test_Date_Column)) As A,Collect(Col,{Id:A.Value,Mydate:Last(FirstN(Sort(LIST169.Test_Date_Column,Test_Date_Column,Ascending),A.Value)).Test_Date_Column}))
3\ Add a label control and set its Text property to:
If(LookUp(Col,Today()<ThisRecord.Mydate).Id<>Blank(),LookUp(Col,Id=(LookUp(Col,Today()<ThisRecord.Mydate).Id-1)).Mydate,Last(Col).Mydate)
Best Regards,
Wearsky
HI @JC75NATS ,
I did a test for you.
1\ This is my sharepoint list.
2\ Add a button control and set its onselect property to:
Clear(Col);ForAll(Sequence(CountRows(LIST169.Test_Date_Column)) As A,Collect(Col,{Id:A.Value,Mydate:Last(FirstN(Sort(LIST169.Test_Date_Column,Test_Date_Column,Ascending),A.Value)).Test_Date_Column}))
3\ Add a label control and set its Text property to:
If(LookUp(Col,Today()<ThisRecord.Mydate).Id<>Blank(),LookUp(Col,Id=(LookUp(Col,Today()<ThisRecord.Mydate).Id-1)).Mydate,Last(Col).Mydate)
Best Regards,
Wearsky