Solved

Need a script to change a Drop Down Value

Posted on 2010-09-14
14
442 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
  • 7
  • 4
  • 2
  • +1
14 Comments
 
LVL 12

Expert Comment

by:North2Alaska
Comment Utility
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
Comment Utility
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
Comment Utility
Are these values hard coded or from the value of a field?
0
 

Author Comment

by:OSXFreak
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:OSXFreak
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
Never got it to work, so will think of other solution, but thanks anyhow.. I'm sure it's just ME :)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now