Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

get (RecordNumber) not working as expected


This topic is 5246 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I am trying to create a value list that will return the placement that the record currently occupies in the current found set. On the surface this sounds very easy; just use get(RecordNumber). The problem that I am running into is that the records I am trying to count are first created in an unrelated table, and then imported into the table that the value list is part of. The reason for this is that the record represents a list of choices presented to the user to choose from a master list of examples, and then once the user has selected from this list, is then imported into the related table where I want the value list to count.

My solution to this problem was to change the field that represented the placement of the record to a calculated value that only counted the record when it was part of the related table. The problem now is that this value only seems to update if I go into the Define Tables portion of the database. If I create my record via the scripted technique I have created, the record is not added to the total found count of the value list. If I remove the Index, obviously the value list will not work. Help!

edit: To further expand upon the issue, based upon the definition of the get (RecordNumber) calculation, the calculated field should be returning the number of records in the current found set of the current window. This is not the result that I'm seeing. What I am seeing however, is that the number returned in the calculated field represents the record number from the "master list" of selectable records that is then imported. i.e. - In my master list I have 76 records, I select record number 69, and then import that record into my data table. The number in the calculated field is then record number 69. To resolve this, I added an if state to say if (Get( LayoutTableName) = "Records"; get (RecordNumber) ; "" ).

Doing this results in the correct number being applied, but the number then does not update for subsequent additions to the found set.

Edited by Guest
Posted

James,

Given that you've received 12 views with no responses, I thought I'd give it a go.

I don't understand your goal. Would you elaborate on why the placement of the record is important. You also mention counting...

Barbara

Posted (edited)

Thanks for the reply.

The reason that the record number is important is that it represents the order in which the records are printed in a report.

I have a field, placement, that is used to determine the print order of the records. This field is filled in based upon the calculated results of a value list that displays the results of get(RecordNumber). This field is then sorted and placed on the report in the numeric sort order.

Edited by Guest
Posted (edited)

Ok this just got even more strange. After fiddling around with my value list I got it to work as intended. The problem? I am drawing the values off of a Calculated field that has the "Do not store calculated results - recalculate as needed" checkbox checked! In the define value list menu it even gives the prompt that the value list won't work, yet it does! Even more strange, I have another value list that is defined off of the same field but a different relationship, and it doesn't work.

Edited by Guest
Posted

Sorry, James. Not getting it. Why not just use replace or a loop to set a sort order? Hopefully, someone with some insight will chime in.

Posted (edited)

It's ok, for some reason it's working as intended now. I'm not sure exactly what the issue was at first that caused the value list to not work.

Edited by Guest

This topic is 5246 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.