Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have a cell in a portal from a Customer table that displays the PRIMARYID of a record. When selected by script (using Set Field) it copys that data onto a field (called PRIMARYID) on the Work Order table. The problem is that my ID from the customer table are C1, C2, C3, etc. It shows fine in the portal, but it ONLY shows 1, 2, 3, etc. on the field it is copied to. I believe everything else works fine in my other relationships and portals that are tied to the field with 1, 2, 3, etc. in it. Any idea why it is not showing the letter, but still working? How can I get the letter to show?

Greg

Posted

That's correct. I thought all Primary Keys should be numbers. I have Primary fields as numbers that auto-enter as serial numbers to generate on creation with the next value being a letter and then the number. Should I still switch both as text?

Greg

Posted

I tried changing the fields to text and there are no options for serial anything. Since the numbers are behind the scenes stuff, should I not worry?

Might this be a future fix for FileMaker?

Greg

Posted

there are no options for serial anything

You sure? You don't have a checkbox under Options > Auto-Enter for "Serial Number?" Also note that value you enter for "Next value" can be a combination of letters and numbers, such as "ID00001" or "c1."

A primary key can be numbers, letters, dates, times, or even (i believe) timestamps. Numbers are typically used because they can be incremented natively by FM, but a lot of developers use other things for various reasons.

J

Posted

Clarification

I do have those options IF the field is a number, not text like you suggested. I had them as numbers and auto-entered as I mentioned. I then tried formatting the field as text and THEN there are no options for making it a serial field.

Greg

Posted

This is really interesting.

I have another table that I'm doing the same thing on and it too shows up fine in the portal; however, when the script runs Set Field (there are four Set Fields in both scripts) for a similar field on this other table everything copies EXCEPT THE PRIMARYKEYID field!!! I haven't tried linking to it from other portals to see if it is there and not showing. I just don't understand why it would do this.

Greg

Posted

If the field in question is text and is not global, you should absolutely have an Auto-Enter serial option. Take a look at the attached file. The last field is called youTryIt. It is a number field with an auto-enter serial. Change that to a text field and see if you don't still have it as auto-enter serial. If you really don't have that option, i think something might be wrong with your installation.

This is not a versioning issue, as i created this file on my 7.01 installation.

J

test.zip

Posted

Thank you! It worked on the table that only showed the number. I don't know why it didn't show before. It now shows both (the letter and the number). Can you help me with my other issue of the one that when Set Field is run it doesn't put anything into that field? I tried changing that field to text too. I'm fairly certain that my script is correct since the other three fields copy over.

Greg

<My Post>

I have another table that I'm doing the same thing on and it too shows up fine in the portal; however, when the script runs Set Field (there are four Set Fields in both scripts) for a similar field on this other table everything copies EXCEPT THE PRIMARYKEYID field!!! I haven't tried linking to it from other portals to see if it is there and not showing. I just don't understand why it would do this.

Posted

Hi QuinTech,

I want to thank you for your help. I was sure that I had my script right, but as I was hand typing the two scripts to you (the working and not working) I realized one small difference and it works now. I think I will change the name slightly to make it more distinguishable. Thanks again!!!

Greg

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