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

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

Recommended Posts

Posted

Okay I have our guys putting there pics in pictures file but they've already named them. Then they open Sales and create new record for the sale then I want them to do two things.

rename picture same as new record and they can't do that until they've created the new record then they have to switch back to picture and rename it before they inser it, darn. and click a checkbox saying that only a 'rference' is stored. They neglect to do both regularly. frown.gif And I also know they sometimes just paste the pic and I don't want that.

i want the pics named unique as ID record for imports and other stuff ive probably not even thought of but it seemed a good idea and maybe cus if something ever got mixed up we' never know which pics went with which sale. I also hate not knowing if they only stored a reference - I can't tell by looking and sometimes the guys just paste it instead. I dont want them pasting.

can I make this easier using a script? Can I make them use it and stop them from pasting directly and make sure the picture is the right name and make sure stored as reference is checked? Why don't filemaker tell me if its a reference or am I not looking in the right place?

oh, and do you know a calc to display the highest number in my serial number field that i can display so they can type in the next serial number? I thought i might have to use a global but I'm unclear on what to put.

Pete

Posted

The easiest way to force people to use Insert Picture is to write a script along the lines of:

  • Go to Field ["MyPictureField"]
    Insert Picture

Then in Layout Mode click on you MyPictureField container field and use the Format > Button to set it as a button that runs this script. Now when the user tries to click on the field to paste in the picture, the script will be run instead.

Note: This will annoy the {beep} out of current users who have got into the pasting habit. smile.gif

Unfortunately there's no way to force them to use the Reference option. There's also no way to know if a container field is storing a Reference or an actual image. You can't even use Set Field to set a container field to a reference (unless the reference is already stored in another container field). frown.gif

Probably the easiest way (if you've got a newish version of FileMaker Pro) to display highest serial number is to use an unstored calculation field and the GetNextSerialValue function.

  • ie. MyNextSerialField = GetNextSerialValue(Status(CurrentFileName), MySerialField)

Note: this value is the NEXT, so it will be 1 higher (or whatever increment you're using) than the existing serial numbers.

Make sure it's unstored so that the value gets updated as the serial number increases.

Posted

You've been most helpful Harry. smile.gif Okay, I think I can script that, I'll give it a shot. And I'll script it to click a 'reference' checkbox and i guess I'll just have to settle for that.

As for naming the pictures, how does everyone else handle it? I'm afraid that if the file is changed or moved, well how do you make sure the pictures stay attached to the unique id? Its like having a fragmented piece of the database hanging out there. Almost like a related database but no unique id to connect them. How do others deal with this? It would be a disaster if our pics somehow got disconnected. When filemaker stores a reference, what is that reference and where is it stored?

Thanks again for your suggestions. Can you say how you handle picture names?

Pete

Posted

I've never bothered to use Reference links since any of my databases that needed images only used very small ones or a few logos in Global fields. The easiest way is probably just to store them in the same folder as the database files (perhaps a sub-folder to make things tidy).

There are various (often expensive) plug-ins that would let you copy and rename files from within FileMaker scripts - but you'd probably have to ask the user to tell you which file they wanted, then copy / rename it and then get them to insert it (from the new name/location) since the Insert Picture script command doesn't allow you to specify a filename via another field. frown.gif

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