I am trying to work with the date / day formatting to generate a query. The issue that i am having is that for some reason, the day from the date is not matching up.
I have a query that is taking a date_start and adding up 1 day for a total of 14 days.
A few of the dates and days line up, but there are couple that don’t see to work correctly
even the most simply query duplicates the dates and days. It should just go through 14 days and add the date and days, but its duplicating certain dates and getting the day of the week wrong.
i’m not exactly sure what you mean, but i do know that there are no other processes for this running from our end. I have even tried to page in Incognito mode and it produces the same result. I just can’t get it to run through the dates / days of the week without a duplication or issue.
BTW: I’m receiving UTC timezone and not local timezone, in Argentina is 10pm, but the values are 1 am, so the api is inserting that. If you search “utc” on this forum you’ll see is a frecuent topic .
It was a pleasure
BTW, what i was refering here for the duplicated thing:
(Just a tip)
If you have an open file in wappler which contents your server connect action (client side), then:
the Wappler Editor (Software) will call the action everytime you reload the page (like a browser will do), so maybe you’re calling from the api, but also wappler stills calling it in the design panel.
Otherwise i don’t know why you’re having duplicated entrys.
Okay, something is very screwy here…or its just messing with me.
I just tried to create exactly what you had above…and it repeats the same date for me. https://atgenius.com/appointment_scheduler/appointment_scheduler.asp
hi Teodor, shouldn’t the repeat function work within itself and keep adding one day to the date until it completes? It seemed to have worked for franse above.
Your way did indeed work (thank you!), but i am just trying to figure out the logic on why my original setup didn’t process the same.
Unfortunately Teodor, i am still having an issue with implementation. I am now trying to integrate this with the calendar function to pull info, but it still does not seem to be handling the Date formatting correctly
In the calendar, i am clicking on a specific day.
The calendar then opens up a module to display the date and then available appointments, but as you can see, its not converting the date to the correct day. Its one day off.
as a workaround right now, i am just adding 1 day to the day formatter to have it match what the actual day is. It seems to work. The only issue i guess would be if there is something else that displays for users in other time zones.
The repeat has its own scope, setting a variable inside does not change the variable on the parent scope unless you use global variables. This is the expected behavior and not a bug.
The date_start in the expression does not find a variable in the current repeat scope so it gets the value from the parent scope and that happens with each loop. So every item will be the same date_start + 1. To make it overwrite the global date_start and update it in each loop set the Global Name property also to date_start, then you get the same behavior as @franse.