Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need a script to change a Drop Down Value

Posted on 2010-09-14
14
Medium Priority
?
488 Views
Last Modified: 2012-05-10
I have 2 Databases, one is SQL, and the other is FMP. They are linked together, and I'm in the final stages of tweaking it for the end users.

They wanted to know if there was a way to change a Drop Down indicator in Photo Status to show Loaded/Up On Web, (This is one of the choices they have) when ever there is data sitting in the SQL database field.

So for instance if my SQL database has Picturescategory|123456.jpg, the photo status field on the FMP DB would automatically show Loaded up on web.

I assume script can do this, but not sure.

Any help is appreciated and more Q's to come I'm sure.

Thanks

Chip
0
Comment
Question by:OSXFreak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 2
  • +1
14 Comments
 
LVL 12

Expert Comment

by:North2Alaska
ID: 33674714
Will the field be empty if its not on the SQL Database?  How is the drop down being populated now?
0
 

Author Comment

by:OSXFreak
ID: 33674829
Currently the field is empty.. BUT I set it up as a control style of Drop Down List. In that list is 5 values they can choose.

ONE of them being Loaded / Up on Web
0
 
LVL 12

Expert Comment

by:North2Alaska
ID: 33675008
Are these values hard coded or from the value of a field?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:OSXFreak
ID: 33675071
They are hard coded from the Value Lists under value list name of Photo Status would is custom values

Does that help?

In other words, if you go to the Inspector and select Data then under the control style it shows values from Photo Status, if you click on the pencil it shows Manage Value Lists or Content Project. This is one of 4 lists :)

Hope that helps if not let me know and I'll see if I can do this another way :)

Chip
0
 
LVL 12

Expert Comment

by:North2Alaska
ID: 33675171
OK, I think I have it now.  If the list is typed in by you, "Loaded/Up On Web" is one of the values and you have assigned this list to the field, then when you display the field is will already be selected.

Now, how do you populate that value in the field?  If the field is part of the SQL database, then do it there.  

If it is not part of the SQL database, then create a calculated field that checks to see if the Picturescategory has a value and based on the result set the value.  The challenge here would be, because it is a calculation the user would not be able to change it.
0
 

Author Comment

by:OSXFreak
ID: 33675278
Hmmmm my fear is that if it's a Calculated field they will not be able to select the other options for other items in that same field..

Thinking we might just have to work around it..

So next Q. If in the list view, and I do a filter on PhotoItems for any data in it.. Is there a way to select ALL the related records in Photo Status and do a paste of "Loaded/Up On Web" in it???
0
 
LVL 12

Expert Comment

by:North2Alaska
ID: 33675358
Would you kindly provide more detail on the flow of data?  I think what you are trying to do is move images from the local to the server?  And then indicate which ones are already loaded?  Is this correct?
0
 

Author Comment

by:OSXFreak
ID: 33675548
Kind of..

OK so I have 2 Fields..
Field 1 has text from SQL The text is either PicturesCategory\NoPic.jpg or PicturesCategory\123456.jpg (the numbers represent the part number)

Field 2 (Photo Status) is a list created in FMP. This is connected to the FMP database.

The photo status has control style of Drop Down List and Values from Photo Status. The Values in that Photo status are..

Need Image from cono
Photo Taken / Needs Proofing
Photo Taken / Proof Rejected
Done / Proofread, Load to Web
Loaded / Up on Web

So basically I want to to do this.. IF Field 1 = PicturesCategory\123456.jpg then Field 2 (Photo Status) = Loaded / Up on Web else Blank so the end user can select a option or value manually. :)

Yeah easy for me to say. I'll attach photo's of the info. I'd send the data, but not sure you could use it since it's tied to my SQL database locally :(

Thanks

Chip


cbinfo.JPG
cblistmenu.JPG
listvalue.JPG
0
 
LVL 28

Expert Comment

by:lesouef
ID: 33675766
thinking of an auto-entered field from calc instead of a full calc field; this allows further change by the user. just my 2 cts.
0
 
LVL 4

Expert Comment

by:mac_guru
ID: 33675884
On your Photo Status set it to a text field and under options, use Auto-Enter with Calculated Value, and do a if/then/else statement to fill out the field.

e.g. If ( Field1="PicturesCategory\NoPic.jpg" ; "" ; "Loaded/Up on Web" )

That means if Field1 = "PicturesCategory\NoPic.jpg" give it a blank value otherwise set the pulll down to "Loaded/Up on Web"
0
 

Author Comment

by:OSXFreak
ID: 33676875
Mac I put that in my system.. but does not seem to be working...The SQL database that has the info is called idnmaster1::itemphoto the fields either have PicturesCategory\NoPic.jpg or PicturesCategory\######.jpg
I think your on the right track, but not sure if I have it set right, I'm attaching the screen shots of the code I used.
I did not set the global thing does that need to be done as well for the Photo Status field?

Chip
0
 

Author Comment

by:OSXFreak
ID: 33676876
Mac I put that in my system.. but does not seem to be working...The SQL database that has the info is called idnmaster1::itemphoto the fields either have PicturesCategory\NoPic.jpg or PicturesCategory\######.jpg
I think your on the right track, but not sure if I have it set right, I'm attaching the screen shots of the code I used.
I did not set the global thing does that need to be done as well for the Photo Status field?

Chip
ifcode.JPG
0
 
LVL 4

Accepted Solution

by:
mac_guru earned 2000 total points
ID: 33677125
Chip,

No, don't need to set it as a global, globals holds a single value throughout the database.

I don't see anything wrong with your field.

See the attached example if that works for you.
chip.fp7
0
 

Author Closing Comment

by:OSXFreak
ID: 33716540
Never got it to work, so will think of other solution, but thanks anyhow.. I'm sure it's just ME :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question