Skip to main content

Questions on IDEA Analysis

Number of weekdays and weekend days between 2 dates

Dear all ,
 
As per subject what is the easier way to find out the exact number of working days and weekend days that occur between 2 dates (regardles of public holidays).
Lets analyse the below example:
Start Date          End Date
02/01/2019        15/01/2019
Equation: End Date - Start Date
Result: 10 working days, 4 weekend days

Adding 1 day to existing database date field

Hi all,
I need to create additional fields (in existing database) where I add 1 day (1st new field),2 days( 2nd new field) and so on to the date in my reference field (lets call it REGISTARE DATE) so the result will be as per below:
REGISTER DATE           REGISTER DATE +1 DAY        REGISTER DAY + 2DAYS

Array issue - out of range

Hi 
I am having some issues with array declaration - the values for 4 elements of my array come from droplistbox in a dialog box however the code stops at first line of my array declaration:
 
UserSelection(1) = DateFieldArray(UserBox.DropListBox1))  and generates the error: "subscript aout of range.
 I cannot figure out the issue since i declared my UserSelection array as 4 elements array.
Code attached
 

Ordinal number in a field

How can I makes sure that in database in IDEA when appending a new field each record will have ordinal number from top to bottom ( 1 to last record) - I thought there might be some function in IDEA to do it similar to ROW() in excel but wasnt able to identify it. I can build something with RecordSet I guess when I will loop from 1 to RecordSet.Count but I am sure there is an easier solution.
Apologies if it is a silly question.

newbie question extract latest record by customer

Hi
I'm new to IDEA so apologies if this is a basic question.
I'm trying to extract by customer the latest record (based on date) from a data file.
I'm not sure how I do this  I know I can summarise to get the unique customers but not sure how to extrac only the latest record
Is this possible using the built in functions
Thanks

IDEA Join - Only matching transaction once

Hello,
When completing a JOIN in IDEA, is there a way to prevent a transaction from being matched more than once? For example, I am matching on a member number and amount, but there may be multiple transactions with the same info... when I attempted to match it picked up the first transaction and matched it twice then ignored the second one.

Expression in Equation parameter of the append field function

Dear all,
I have a problem of passion gthe correct argument wihtin the string associated to my equation expression of append field function. I have created bespoke append field function (below):
' Appending field
Function AddFieldToDatabase(TargetDb As Database,NewField_Name As String,Req_Field_Type As Integer ,Criteria As String)
 
'Set TargetDb = MasterDb  this is not always MasterDb 
 
'Creating the task
Set task = TargetDb.TableManagement
'Obtaining reference to the table

Argument from dialog box not read correctly within extraction function

I am having  an issue with the argument passed by the user through the dialog box to be used in later stage of the code execution. Below is the call to the bespoke extraction function that i created:
Call extraction_selectedfields_and_export(TargetDb,"Sales journals","@Isini(""Revenue""," & UserChoice(3) & ")",Arr_FieldToInc(),FieldToInc)
The problem occurs with the criteria line for AddEtraction part which includes function Isini:
1. "@Isini("& UserChoiceRecords(0) &"," & UserChoice(3) & ")"