Hi Paul
Updating my reply:
For Excel - I believe the IF conditions work on the rows of data, not the log message, which is typically in a cell and row of your choosing, but above the data - sometimes in line with column headers. So for example, let's say output starts on row 3, it will look at data in row 3 and beyond.
Perhaps you can amend your IF condition to say IF column C (just picking a random one that should have data if you have results) is empty (or is not empty) then do something or don't do something.
For Forms - I've used this formula
number(normalizeSpace(substringBefore(substringAfter($form.getValue('/my:myFields/my:QueryDepAreas/my:QueryDepAreas_Output/my:LogField_QueryDepAreas'), 'Records extracted - '),'Date and Time ')));
The above may be overkill, but I wanted to show the number of rows as a number. I've used the substringAfter and substringBefore combination a bunch of times. You can then take that number and check it and do as you wish in the solution.
Best Regards,
Sigrid
------------------------------
Sigrid Kok
Precisely Software Inc.
------------------------------
Original Message:
Sent: 08-09-2024 02:29
From: Paul Leydier
Subject: Validation rules - Contains
Hello,
I try to apply a validation rule on a logfield using the function contains.
I want a pop up message when the query find 0 result :
"Log Winshuttle Studio 20.3SAP System: Client: SAP User - QE1:100:pleydierMode - Table; Script Name - Table_20240807_094224.QsqRecords extracted - 0Date and Time - 8/9/2024 6:21:17 AMExecution Time - 0:00:01Run Reason - "
And no message when the query find 1 result :
"Log Winshuttle Studio 20.3SAP System: Client: SAP User - QE1:100:pleydierMode - Table; Script Name - Table_20240807_094224.QsqRecords extracted - 1Date and Time - 8/9/2024 6:17:07 AMExecution Time - 0:00:01Run Reason - "
With the rules:"Logfield contains "0" ", the pop message appear whatever the query result is.
I guess it's because I have a "0" in my log in any case, so I try to replace the "0" in my rule by :"0Date" but with this condition the pop never appear.
How can I make this rule work ?
Regard
Paul
------------------------------
Paul Leydier
MDM
Markem-Imaje Industries
------------------------------