I'm experiencing some strange behaviour with the Concurrent function, and while I have found a way to circumvent the issue, I'm hoping someone could explain what is causing this issue.
I have a OnTimerEnd function, which first checks if a Sharepoint List item has been updated since the last time the timer finished. If the list has been updated, we refresh a gallery, and if not, we save user input to the list. My logic seems to work just fine, but while attempting to do this to three different items (in different lists) inside a concurrent function, I'm getting the following error "The function 'If' has some invalid arguments.'.
Below are some pseudocode examples:
If(
!listItemUpdated,
//true
Patch(someList, LookUp(someList, ID = someID), {col1: someValue, col2: someValue2,...},
//false
Refresh(someList)
)
Above code works as expected, indicating my logic and the Patch function work as they should.
Concurrent(
If(
!listItemUpdated,
//true
Patch(someList, LookUp(someList, ID = someID), {col1: someValue, col2: someValue2,...},
//false
Refresh(someList)
),
If(
!list2ItemUpdated,
Patch(someList2, LookUp(...
)
Copy pasting the working code inside the Concurrent function gives the error mentioned above.
Concurrent(
If(
!listItemUpdated,
//true
Patch(someList, LookUp(someList, ID = someID), {col1: someValue, col2: someValue2,...},
//false
Refresh(someList)
); Set(someVar, Blank()),
If(
!list2ItemUpdated,
Patch(someList2, LookUp(...
)
Now, if I add some other function inside the concurrent formula, the error disappears. I've tried using Set and Notify, and both seem to get rid of the error, so I'm assuming adding any functionality to the formula would get rid of the error.
I'm hoping someone could help me identify the cause of the error. If my pseudocode is too vague I can clarify it more in the comments.
Thanks in advance.
P.S. Hopefully the format of my post is good, it's my first time posting on these forums.