Jump to content

mKirk

Members
  • Posts

    37
  • Joined

  • Last visited

mKirk's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. What is the scripted equivalent of striking the "Enter" key and/or clicking the mouse in an area not containing a field, etc.? I'm always finding myself wanting to update the current record I'm viewing without a field being selected, etc...and refresh window doesn't seem to be the key. Thanks in advance.
  2. Let me see if I can explain my latest difficulity. Say you have 10 fields...with 3 of them containing data and the rest empty, like: field01= "" field02= 2 field03= "" field04= "" field05= 5 field06= "" field07= "" field08= "" field09= 9 field10= "" What I'd like to do is write a button script that "moves up" the 3 fields which have data (in numeric order) to end up with: field01= 2 field02= 5 field03= 9 field04= "" field05= "" field06= "" field07= "" field08= "" field09= "" field10= "" I'm not sure if this is some sort of sort function or something else which is as yet unknown to me. As usual, thanks in advance for any assistance.
  3. Ah! It was the... TextColor( GetField(Get(ActiveFieldName)); If( Get(ActiveFieldContents) = "√"; RGB ( 25 ; 125 ; 50 ); RGB ( 235 ; 30 ; 35 ) ) ) ...in a loop that I was missing. Thanks!
  4. Sorry...but I'm not sure I'm understanding any of the responses so far. Perhaps I worded my question poorly. I'm not having trouble getting the field to become the color I desire using the script I gave in the original post. What I was curious about was if there was a way to apply the textColor formatting to a group or range of fields without having to copy/paste the script 100 times and replace the field names.
  5. I have the following script I'm using to determine the textColor of a field based on its contents: If [ testData::r001 = "√" ] Set Field [ testData::r001; TextColor ( testData::r001 ; RGB ( 25 ; 125 ; 50 ) ) ] Else Set Field [ testData::r001; TextColor ( testData::r001 ; RGB ( 235 ; 30 ; 35 ) ) ] End If You'll note that I'm applying this to field "r001"...I have 100 of these types of fields ("r001" - "r100"). The question is can I apply this script to all of them without having to repeat the script 100 times? Thanks in advance for any assistance.
  6. Thanks much...that worked exactly as I had hoped. It was the lookup part of the equasion that I was missing. Thanks again for the assistance.
  7. I have two tables; "TableA" and "TableB". Each table has four fields; "1", "2", "3", "4". What I want to do is... When I create a new record in TableB, I'd like to do something like this: TableB/Field1 = TableA/RecordX/Field1 TableB/Field2 = TableA/RecordX/Field2 TableB/Field3 = TableA/RecordX/Field3 TableB/Field4 = TableA/RecordX/Field4 "RecordX" is a specific record in TableA...it never changes. I can get this to work using a series of Go To/Copy/Paste type of scripts, but this doesn't seem to be very elegant and I have the feeling I'm not fully understanding the power of relational dB (I'm new here, remember) and that there must/should be a more efficient way to script this. Thanks in advance for any help. Kirk
  8. Well, it WAS Auto-enter serial...but I changed it around and have it working. Yes, all the questions to belong to one test, btw. Now don't laugh...but here is what I did to get it to work: Copy [ Select; testBuilder::NextNum ] Paste [ Select; testBuilder::GoToQuestion ] New Record/Request Paste [ Select; testBuilder::Question ] Loop Go to Record/Request/Page [ Next; Exit after last ] Set Field [ testBuilder::Question; testBuilder::Question + 1 ] End Loop Sort Records [ Restore; No dialog ] Go to Record/Request/Page [ No dialog; testBuilder::GoToQuestion ] I just set the first question number to "1". NextNum simply adds one number to the previous question number to determine the next question number, etc. I also paste the value of NextNum into the global "GoToQuestion", that way I can "jump back" to the new "inserted" question. The end result to the user makes it appear as if a question (Record) has been inserted at a specific point in a series of questions. I have no idea if this makes any sense to anyone else...or could even be helpful (no doubt there is a more elegant way of doing the same thing)...but there it is. Thanks for all the assistance.
  9. It's funny that you should mention that...it's what I'm trying right now in fact. I know I can create a "work around"...but thought perhaps there was a more elegant way of doing it that my limited experience was missing. :o
  10. In what I have going, #5 becomes #5 on creation of a new record using the Auto-enter serial function.
  11. Okay, let me be more specific. I do understand the basic concepts that you both are discussing...perhaps where my knowledge is lacking is with regards to sorting. I'm building a little testing solution. I have two layouts for questions, one for True/False, and the other for Multiple Choice. The "builder" of the test can create a test using T/F or M/C in any order they wish (e.g. Question #1 T/F, #2 M/C, #3 M/C, #4 T/F...). When a student takes the test, I have a script that "looks ahead" to determine if the next question is T/F or M/C and based on that info displays the appropriate layout. Works fine. In making the "admin" side of this more robust, I thought it would be nice for the builder to be able to go back into a created test and edit and/or delete questions, as well as insert new questions. I figured out the edit and deleting functions. It was the insert function where I got stumpted, hence my question. Let's say the builder wanted to add a new question "in between" question #5 and #6 (thus making the new question #6 and the old #6 becomes #7 and so on). That's why I wanted to be able to "insert" a new record as opposed to it adding on to the "end" of the record set. Now perhaps I'm thinking about this all wrong...which wouldn't be the first time. But this is how I have it set up at the moment. I will look into Sorting a bit more closely to see if there is a way to track this that way. But if anyone has any other suggestions, etc. it would be appreciated. Thanks!
  12. Still learning here...but it's not like I didn't try to find the answer to this elsewhere, so thanks in advance for helping with a "101" question...which is... How can I insert a record in a specific place? Meaning, say I have 10 records and I'm viewing Record5. Now I want to insert a new record right there so it becomes the new Record6, and the other record numbers (which I'm serializing and assuming I can use Get ( RecordNumber )) adjust accordingly. Thanks again for any assistance or suggestions or FM Manual page numbers, etc.
  13. I am creating multiple records with a single script step. Each of these records is blank, except I am numbering them using the Auto-enter Serial option. When I set the starting number to "1" and then increment by "1" all works well. However, if I delete all records and build another set, of course the numbering of each record picks up where it left off. My question is is there a way via a script to reset the initial value back to "1' without entering Define Database, etc.? If not, perhaps I could do my auto record numbering in a different way? Thanks in advance for any suggestions. Kirk
  14. I'm quite sure the answer to this is obvious. I would like to be able to place a number in a field...and then have a script which uses that number to create said number of blank records ("5" = 5 New Records). I can't seem to find any such "Create Multiple New Records" functionality. Thanks in advance for any help or suggestions. Kirk
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.