I am using CR11 with Macola progression. I have a list account numbers which, for each number, I want to search through a list of notes and if it finds a matching number, display the note corresponding to the number. I have tested the strcmp line on it's own with a value of <>0 and it works but I cannot get the loop to work properly.
I get the error "a loop was evaluated more than the maximum number of times allowed." It seems to not go to the next record and just evaluates the current record always. I have changed the while condition to = "" and it exits but I get the value of True instead of my strcmp value. I have also tried for the while condition not onlastrecord but I still get the error above. Removing the Not exits the loop and the value True shows again.
If the loop needs an array, I am not very familiar with them so I would need help in preparing that as well.
Thanks for any help
BB
If the notes field is in a separate table, why not just link the two tables together with an equal join?
Instead of showing a solution that doesn't work, I think you should show some sample data at the detail level using the fields you mention, and also show the content of your nested formula . Then show a sample of the results you are trying to achieve.
The way the information is stored in the tables for the account numbers is 3 columns. Each column can have a range from 0 to 8 alphanumeric characters. If an account is configured to use only 4 numbers per column, for example, then the software fills the column with lagging zeros so there will always be eight characters in a column. The mergeaccount formula merges the 3 columns into 1 line. Now the way the notes are stored in the other table is the 3 columns are merged into a single column so I cannot link the tables at all. I also cannot modify the tables by adding columns.
Example of accounts
table 1 (account numbers)
main department cost center
53300000 22430000 00000000
53300000 30000000 35100000
53300000 40000000 40100000
Table 2 (notes on account numbers)
note_name_value sys_note_1
533000002243000000000000 87445-5551-55512
533000003000000035100000 1254-55-5526
533000004000000040100000 dfd-0d52s-sd5
What I want to do is for each account number in table 1(using to combine the accounts), search the note_name_value in table 2 and display the corresponding value in sys_note_1. I have hundreds of account numbers with just a few notes for now.
Here is the code I have so far
I do get a result now with the above code but only in one field. The second line in the account numbers are shown. I also do not understand why the while loop only works when the isnull is used since the data in the column is not a null.
BTW. I posted my earlier code so someone could tell me what is wrong with it.