AnsweredAssumed Answered

Perform find does not work as supposed

Question asked by padje on Mar 21, 2018
Latest reply on Mar 21, 2018 by padje

I'm having issues with a perform find action.

 

The problem occurs in a script, but also just in find mode.

I'm sure the values exist, so a perform find should give me a result.  But that's not the case.

"No records match criteria" is the message.

 

Below you find my script.  It works like a charm when using textfields.

As soon as I look for a number (in bBUYline::zzcTotalofBUYlines_VATin), no records are found.

 

Maybe someone can chime in ?

 

bBUYline::zzcTotalofBUYlines_VATin is an unstored calculation with numerique output.  The calculation is based on a summaryfield + a calculationfield, which on it's turn is based on the sum of two summary fields.

 

bTRANS_start_dsc::zzgAmount is a numerique global field

 

In attachment you van find a screenshot from the fields involved and their definitions.

 

 

This is the script.

 

  • #PURPOSE: To filter the current found set of Transaction by filter criteria inputted by the user.
  • #Start, End Context: Transaction, Transaction
  • #Globals: None
  • #Parameters: None
  • #Results: None
  • #2014-06-20, EB, Created script.
  • #2017-04-28, JH, Now using JSON to pass parameters.
  • #2017-09-01,jk, duplicated from find.CON, adapted
  • #2017-09-09, jk, adapted variables to global variables so perform script (sort) could be integrated
  • #----------TRAP INTERFACE ERRORS-----------
  • Allow User Abort [ Off ]
  • Set Error Capture [ On ]
  • #----------POPULATE SCRIPT PARAMETERS AND VARIABLES-----------
  • #Parameters
  • Set Variable [ $$activeObjectName; Value:JSONGetElement( Get( ScriptParameter ) ; "activeObjectName" ) ]
  • #Variables
  • Set Variable [ $$selectionSelectionSize; Value:Get( ActiveSelectionSize ) ]
  • Set Variable [ $$selectionStartPosition; Value:Get( ActiveSelectionStart ) ]
  • Set Variable [ $$transactionnumber; Value:bTRANS_start_dsc::zzgTransactionnumber ]
  • // Set Variable [ $$transactiontype; Value:bTRANS_start_dsc::zzgTransactiontype ]
  • Set Variable [ $$amount; Value:bTRANS_start_dsc::zzgAmount ]
  • Set Variable [ $$vendor; Value:bTRANS_start_dsc::zzgVendor ]
  • Set Variable [ $$transactionstate; Value:bTRANS_start_dsc::zzgTransactionstate ]
  • #----------FILTER LIST OF INSPECTORS BASED ON FILTER CRITERIA-----------
  • Freeze Window
  • #Omit all records if the user didn't enter anything into filter fields
  • Set Variable [ $criteriaPresentFlag; Value:Case( not IsEmpty ( $$transactionnumber) or not IsEmpty ( $$vendor) or not IsEmpty ( $$amount) or not IsEmpty ( $$transactionstate ) ; 1 ; "" ) ]
  • If [ $criteriaPresentFlag = 1 ]
  • Enter Find Mode [ ]
  • Set Field [ bTRANS_start_dsc::Transactionnumber; $$transactionnumber ]
  • // Set Field [ bAPP_Transactiontype::Codevalue; $$transactiontype ]
  • Set Field [ bCON.vendor::NameFirst_NameLast; $$vendor ]
  • Set Field [ bBUYline::zzcTotalofBUYlines_VATin; $$amount ]
  • Set Field [ bAPP_Buystate::Codevalue; $$transactionstate ]
  • Perform Find [ ]
  • Else
  • Show All Records
  • Go to Record/Request/Page [ First ]
  • End If
  • #----------SORT RECORDS
  • Perform Script [ “gen.SortLists (gear, con, buy)”; Parameter: "buy" ]
  • #----------RETURN TO ORIGINAL FIELD AND ITS SELECTION LOCATION-----------
  • Go to Object [ Object Name: $$activeObjectName ]
  • Set Selection [ Start Position$$selectionStartPosition; End Position$$selectionStartPosition + $$selectionSelectionSize ]
  • #Variables
  • Set Variable [ $$activeObjectName; Value:"" ]
  • Set Variable [ $$selectionSelectionSize; Value:"" ]
  • Set Variable [ $$selectionStartPosition; Value:"" ]
  • Set Variable [ $$transactionnumber; Value:"" ]
  • // Set Variable [ $$transactiontype; Value:"" ]
  • Set Variable [ $$amount; Value:"" ]
  • Set Variable [ $$transactionstate; Value:"" ]
  • Set Variable [ $$vendor; Value:"" ]
  • #----------WRAP-UP-----------
  • Exit Script [ Result: 1 ]

 

Thanks in advance for your time and input.

 

Greetings

Outcomes