I have an Action which updates a field called “Next Date” by deriving the date from other date fields
The formula is:
TEXT(
INDEX(EXTRACTDATES(
CONCATENATE(
"""",
IFS(
DAY([_THISROW].[JV Date])<DAY(ANY(SELECT(FY Periods[Period Start Date],INDEX([List of Periods for Recurring],[Nos Recurring Trxs])=[Period Unique Id]))),
MONTH(ANY(SELECT(FY Periods[Period End Date],INDEX([List of Periods for Recurring],[Nos Recurring Trxs])=[Period Unique Id]))),
DAY([_THISROW].[JV Date])>=DAY(ANY(SELECT(FY Periods[Period Start Date],INDEX([List of Periods for Recurring],[Nos Recurring Trxs])=[Period Unique Id]))),
MONTH(ANY(SELECT(FY Periods[Period Start Date],INDEX([List of Periods for Recurring],[Nos Recurring Trxs])=[Period Unique Id])))
),
"/",
DAY([_THISROW].[JV Date]),
"/",
IFS(
DAY([_THISROW].[JV Date])<DAY(ANY(SELECT(FY Periods[Period Start Date],INDEX([List of Periods for Recurring],[Nos Recurring Trxs])=[Period Unique Id]))),
YEAR(ANY(SELECT(FY Periods[Period End Date],INDEX([List of Periods for Recurring],[Nos Recurring Trxs])=[Period Unique Id]))),
DAY([_THISROW].[JV Date])>=DAY(ANY(SELECT(FY Periods[Period Start Date],INDEX([List of Periods for Recurring],[Nos Recurring Trxs])=[Period Unique Id]))),
YEAR(ANY(SELECT(FY Periods[Period Start Date],INDEX([List of Periods for Recurring],[Nos Recurring Trxs])=[Period Unique Id])))
),
""""
)
),1),
"mm/dd/yyyy")
This works fine if I trigger the action from the desktop but fails from the phone by giving a message “Invalid Next Date”.
Locale settings are as follows:
Googlesheet – US (which has default date format as “mm/dd/yyyy”)
Appsheet tables- US
Phone – India (which has default date format as “dd/mm/yyyy”)
Seems it is failing because of the locale setting of the Phone.
Any way to fix this please?
How many layers of select statements do you have inside there?!? 😳
Nesting select statements is a no-no, is going to really mess up the performance of your app.
User | Count |
---|---|
33 | |
30 | |
30 | |
19 | |
16 |