New Circular Definition Error

Hi team,

I have a strange circular definition error on an app formula to generate a new DateTime value.

The goal is to add to the current datetime either a number of hours (if now() is within working hours (08:00 - 17:00)) or a number of days if [SLA_Days] is not blank.

The expression is valid but Appsheet is complaining about a circular definition.

Would anyone know how this is circular, I’m pretty sure that this expression worked yesterday and I’ve returned to the app build this morning to find this error.

These are the columns and types included within the expression:

[CBRE_Priority_Level] = Ref. 

[SLA_Days] = Number

[Within working hours?] = Boolean

[Date_Time] = Date Time

[Added Time] = Duration

This is the expression itself:

ifs(

and(
isblank([CBRE_Priority_Level].[SLA_Days]),
[Within working hours?]=FALSE),
workday(date([Date_Time]),1)+[Added Time],

and(
isblank([CBRE_Priority_Level].[SLA_Days]),
[Within working hours?]=TRUE),
[Date_Time]+[Added Time],


isnotblank([CBRE_Priority_Level].[SLA_Days]),
concatenate(workday(date([SLA_Days]),1)," ",time([SLA_Days]))
)

If anyone has any idea of how to remedy this, that would be great.

Best,

Chris.

Solved Solved
0 3 97
1 ACCEPTED SOLUTION

Hi,

Thanks for your response, although I have found the issue.

It seems that the issue lies with the boolean column of [Within working hours?].

This column is to check whether the datetime of the record is between 0800 - 1700, but the problem was that the expression was attempting to evaluate the datetime value within the column where I had the original expression.

It wasn't until I looked into the error I went looking into other columns:

Chris_Jeal1_0-1706265458026.png

I think the key takeaway is to look into all columns that your referencing within your expression as well as the expression itself.

Thanks again for your response,

Best,

Chris.

View solution in original post

3 REPLIES 3

Could you mention what is the column type where you are using the expression?

This may or may not be a problem, but it sounds that the last if result is text type 

concatenate(workday(date([SLA_Days]),1)," ",time([SLA_Days]))

Should it be temporal (date, date time or duration)  type? You may want to take a look at it.

Hi,

Thanks for your response, although I have found the issue.

It seems that the issue lies with the boolean column of [Within working hours?].

This column is to check whether the datetime of the record is between 0800 - 1700, but the problem was that the expression was attempting to evaluate the datetime value within the column where I had the original expression.

It wasn't until I looked into the error I went looking into other columns:

Chris_Jeal1_0-1706265458026.png

I think the key takeaway is to look into all columns that your referencing within your expression as well as the expression itself.

Thanks again for your response,

Best,

Chris.

Great. Nice to know you got it working and thank you for the detailed update on resolution. Such updates help any future reader of the thread.

Top Labels in this Space