Hi there,
In my App for Asset Registrations I’ve got a table Assets with a Handout Date (the date the asset is given to the employee) and a Return Date (for receiving the Asset). Since these dates can be modified I want to create 2 Log records: one for when the asset is handed out, and another one when it is returned.
For that I created 2 Actions. The first one should only be executed when there is no record in the log table of the type “Out”. I used the filter in the Behavior section for this:
(NOT(COUNT(select (AssetLogs[AssetLog], [Asset] = [_THISROW].[Asset] & [Employee] = [_THISROW].[Employee] & [InOut] = “Out”)) > 0))
The other one should only be executed when there is no record of the type “In”:
(NOT(COUNT(select (AssetLogs[AssetLog], [Asset] = [_THISROW].[Asset] & [Employee] = [_THISROW].[Employee] & [InOut] = “In”)) > 0))
The record to log the handout is created correctly. The record for the return however is not created. I tried using 2 different Workflows both with the corresponding Action and (thinking 2 Workflows on the same table might not work) combined them in 1 Workflow. Both methods were unsuccessful.
Is it possible to do what I am trying to do? And if so, what would be the way to do it?
Thanks in advance!
Andre
Solved! Go to Solution.
Try
COUNT(select (AssetLogs[AssetLog], AND( [Asset] = [_THISROW].[Asset] , [Employee] = [_THISROW].[Employee] , [InOut] = “In”))) = 0
Try
COUNT(select (AssetLogs[AssetLog], AND( [Asset] = [_THISROW].[Asset] , [Employee] = [_THISROW].[Employee] , [InOut] = “In”))) = 0
Thanks! That’s how it should be done. Copied it and it worked like a breeze. And then expanded it with some other checks that needed to be done. This definitely pointed in the right direction.
Also, I realize I should study the expressions some more. As a programmer I have a lot of experience with C#, Javascript and TSQL but I should forget about that with these expressions.
Thanks again! Much appreciated!
User | Count |
---|---|
36 | |
33 | |
27 | |
23 | |
18 |