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

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

Recommended Posts

Posted

It is probably a very very large number. Click in the field where the "?" appears, and see if a number turns up.

-Stanley

Posted

Actually, I take that back. For some reason I thought it would return a gigantic number from the system clock (date converted into seconds). You're probably just looking at a formatting error.

-Stanley

Posted

I'm actually using it in a calculation for a text field that is part of captKurt's Unique Auto-entered Primary Key IDs v2.1 (http://www.fmforums.com/threads/showflat.php?Cat=0&Number=100135&page=0&vc=1#Post100135).

The code as I'm using it is:

Right( "000000" & Status(CurrentRecordID); 6) &

Middle("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Round(Random*35;1); 1) &

Right( "00000" & Hour ( Get ( CurrentTime ) ) & Minute ( Get ( CurrentTime ) & Seconds ( Get ( CurrentTime ) ) ); 6 ) &

Middle( "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Round(Random*35;1); 1) &

Right( "00000" & Month ( Get ( CurrentDate ) ) & Day ( Get ( CurrentDate ) ) & Year ( Get ( CurrentDate ) ); 6 ) &

Middle( "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Round(Random*35;1); 1)

And it's putting in a "?" in the 20 digit keys that it generates.

Posted

You have both pre-7 and 7 function calls in your code, so I'll assume you meant Get(RecordID).

If you click in the field, does it display correctly? It could be that the field is not formatted to display enough characters.

Posted

The field is large enough... it's not a truncation issue due to field size on the layout. I'm getting keys like:

000681B00015?12220051

The "?" is always the 13th digit. I was guessing it's because of the Seconds(Get(CurrentTime)) portion of that middle set of 6 in the calculation code.

Posted

Ah, you are missing a closing parens after Minute(Get(CurrentTime) and have an extra one before "; 6" that needs to be removed.

In its current state you are concatenating the current time with seconds and taking the minute result of the concatenation, which is probably nonexistent.

Posted

That would do it, i noticed the missing ")" after the minute thing, but couldn't see where the extra one was.

The weird part is that not all of the keys generated with that method have the "?" in them and I didn't make any changes to the script when i implemented it.

This topic is 7237 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.