Lecture 7 Conditional Scripting and Importing/Exporting.

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

Accessing electronic journals from off- campus This causes lots of headaches, but dont despair, heres how to do it! (Please note – this presentation is.
Microsoft® Access® 2010 Training
Lecture 4 Basic Scripting. Administrative  Files on the website will be posted in pdf for compatibility  Website is now mirrored at:
Introduction to Computing Science and Programming I
Understanding the Three Basic Structures
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Exit Microsoft Outlook Skills Using Categories for Sorting, Filtering and Creating Group Oklahoma Department of Corrections Training Administration.
Irish Butterfly Monitoring Scheme Tutorial for online system
NextGen Trustee Receipting
Online Textbook Adoptions NCSU Bookstores Last revised – February 12, 2008.
Blogs – what, why and how? A blog is a web-log It is a simple website that anyone can setup without any advanced computer know-how It’s the future: blogs,
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
Microsoft ® Office Word 2007 Training Mail Merge II: Use the Ribbon and perform a complex mail merge [Your company name] presents:
Using Microsoft Outlook: Basics. Objectives Guided Tour of Outlook –Identification –Views Basics –Contacts –Folders –Web Access Q&A.
This is Google Drive. It stores all the documents you have made here.
Create Mailing Labels (Word 2007) Word 2007 using the Mail Merge function and an Excel spreadsheet Create mailing labels from Member Rosters in.
Lecture 5 Relational Databases and going multiuser.
1 1 Brian A. Caseload Threshold Reporting Refer to Slide 2 for instructions on how to view the full-screen slideshow.Slide 2.
JavaScript Form Validation
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
An Introduction to Textual Programming
NextGen Trustee Department Disbursements This class will cover the various methods of handling department disbursements. Whether entering them manually.
Adding Content To Your Faculty Page 1.Login 2.Create your Faculty Page 3.
Address Refer to Slide 2 for instructions on how to view the full-screen slideshow.Slide 2.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012.
PowerTeacher with Web Grade Book Semester Classes School Year August 2012.
Basic & Advanced Reporting in TIMSNT ** Part Two **
1 TEISS Case Project Introduction Melinda Ronca-Battista and Angelique Luedeker ITEP/TAMS Center.
VETERANS BENEFITS ADMINISTRATION March 16, 2014 ABCs of The GI Bill Website & VA Once.
Database Systems Microsoft Access Practical #3 Queries Nos 215.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Voting with SOSA/OVRD SOSA/OVRD. Login and Information Screens After login, the SOSA Voting Information screen displays The Database drop-down allows.
Effort Reporting System Cost Transfer Demo A step-by-step guide to doing cost transfers (retros) in ERS.
EQ: How can we learn the basics of formatting a college research paper in Microsoft Word? Mini Unit: Typing a Paper Diogene Date: 4/20/2015 Course: ELA-Grade.
BMTRY 789 Lecture 11: Debugging Readings – Chapter 10 (3 rd Ed) from “The Little SAS Book” Lab Problems – None Homework Due – None Final Project Presentations.
Lesson 10 - Mail Merge and Reviewing Documents Advanced Microsoft Word.
) Main Menu: You can access all aspects of the database from this screen 2) Contacts: You can access the “contact database management” side of.
Researcher training for ACAP © Created by Isaac P. E. Mailleue Research Integrity Coordinator University of North Carolina at Greensboro September 2013.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding the Three Basic Structures Structure: a basic unit of programming logic Any program.
5.04 Apply Decision Making Structures
Intro to Loops 1.General Knowledge 2.Two Types of Loops 3.The WHILE loop 1.
Home Screen Grade Book Setup Before setting up the grade book, we need to setup the preferences. Select Preferences.
BLOG STARTUP. What is a blog A Blog (or weblog) is an online journal or ‘diary’ that can be immediately and easily updated. A Blog can consist of a list.
While loops. Iteration We’ve seen many places where repetition is necessary in a problem. We’ve been using the for loop for that purpose For loops are.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
March 21,  All Transportation information will be housed in eStar  No more spreadsheet, faxing, ing forms  Transportation will pull information.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
VERIFYING SPECIAL ED DATA TAMMY SOLTIS IU 5 DATA SUPERVISOR.
Nextgen Bank Reconciliation Resource Bank Reconciliation Menu Financial Management Bank Reconciliation –Import Bank Statements –Reconcile Bank Accounts.
CMSC201 Computer Science I for Majors Lecture 05 – Comparison Operators and Boolean (Logical) Operators Prof. Katherine Gibson Prof. Jeremy.
Continuing Professional Development How to fill in your summary online
A step-by-Step Guide For labels or merges
How to complete the profile and make an application.
Effort Reporting System Cost Transfer Demo
Single Sample Registration
TScore Trampoline Scoring and Competition Organiser
Web Programming– UFCFB Lecture 17
Commonapp.org #commonappready © 2015 The Common Application.
Microsoft Excel All editions of Microsoft office.
NextGen Purchasing Calendar Year End 1099 Process
Creating and Modifying Queries
Conditions and Ifs BIS1523 – Lecture 8.
Understanding the Three Basic Structures
Introduction to TouchDevelop
Selection Statements Chapter 3.
Presentation transcript:

Lecture 7 Conditional Scripting and Importing/Exporting

Administrative To make the project easier, a combined step by step will cover importing/exporting and relational for parts of the project (not all) To make the project easier, a combined step by step will cover importing/exporting and relational for parts of the project (not all) You may find it helpful to review previous lectures while working on the project You may find it helpful to review previous lectures while working on the project I would prefer all projects in by the 17 th ( them to me, or I will set up an online submission) I would prefer all projects in by the 17 th ( them to me, or I will set up an online submission) Last lecture is on the 10 th but I may upload one additional lecture for you to review on your own Last lecture is on the 10 th but I may upload one additional lecture for you to review on your own

Administrative(pg 2) The test details and study guide will be given on the 10 th The test details and study guide will be given on the 10 th You will have until the 22 nd to take the test online at your convenience (1 hour time limit) You will have until the 22 nd to take the test online at your convenience (1 hour time limit) I recommend starting on the project soon. I recommend starting on the project soon.

Summary Lecture 6 Advanced Finds Advanced Finds Calculations Calculations  Conditional  Logical  String/Number Ops  Comment

Topics Script Conditional Script Conditional  If statement  Loop  Set Field  Replace Importing Importing Exporting Exporting

Script Conditionals We learned simple scripts, now let’s add some real power using what we learned last time We learned simple scripts, now let’s add some real power using what we learned last time Just as in calculations you can use If statements. There are the following differences Just as in calculations you can use If statements. There are the following differences  There is no case equivalent  You can choose to perform or not perform script steps based on the result  You use it in combination with a calculation to determine what step to take next.

Script Conditionals Often times it is used with the Status(flag) function. Often times it is used with the Status(flag) function.  The Status function takes in a flag that can give you information about the system for example:  Which button was pressed = Status(CurrentMessageChoice) = 2 (was the second button pressed)  How many records were found Status(CurrentFoundCount) = 1 (was only one record found)

Script Conditionals  There is also an else step that can be put after the if. This is used if you have mutually exclusive conditions and you want the later to ONLY be executed if the if is false  Which of these scripts works for finding out which button was pressed and why

Script Conditionals 1.ShowMessage(“Message”) If(Status(CurrentMessageChoice)=1 ShowMessage(“Button one pressed”) Else ShowMessage(“Button two pressed”) EndIf ShowMessage(“Button three pressed”) 2.ShowMessage(“Message”) If(Status(CurrentMessageChoice)=3 ShowMessage(“Button three pressed”) EndIf If(Status(CurrentMessageChoice)=2 ShowMessage(“Button two pressed”) EndIf If(Status(CurrentMessageChoice=1 ShowMessage(“Button one pressed”) EndIf

Script Conditionals Here is another CORRECT way to do it: ShowMessage(“Message”) If(Status(CurrentMessageChoice)=1 ShowMessage(“Button one pressed”) Else If(Status(CurrentMessageChoice)=2 ShowMessage(“Button two pressed”) Else ShowMessage(“Button three pressed”) EndIfEndIf

Script Conditionals  Usually when you have one all or nothing decision an else is good otherwise just use multiple If’s; just remember anything not between an If and an EndIf will ALWAYS be executed  One important thing to notice is that everything is indented to show you what is within each If statement

Script Conditionals  As you can see the outer if statement(Red) Engulfs the smaller If Statement(Blue) this is similar to a case statement where if the first is true then use that else check next etc.

Script Exercise  Now using CurrentFoundCount come up with a script that brings up a message if there are zero arguments and takes the user to a “main” layout, takes the user to the “edit” layout if there is only one record, and takes the user to a “list” layout if there are more than one records.

Script Exercise Here is one way to do it, try it a different way in your project remember the areas outside of your “ifs” can contain things done by all paths Here is one way to do it, try it a different way in your project remember the areas outside of your “ifs” can contain things done by all paths Remember anything that could be done with verification can also be done here, you are not limited to the status function Remember anything that could be done with verification can also be done here, you are not limited to the status function

Loops Loops allow you to go through the records, usually sequentially, until some end state is reached. Loops allow you to go through the records, usually sequentially, until some end state is reached. Make sure and put an end state in or you may end up in an infinite loop! Make sure and put an end state in or you may end up in an infinite loop! Here’s an example script with two exit conditions, if the criteria is found or if the last record comes up Here’s an example script with two exit conditions, if the criteria is found or if the last record comes up

Loops Loops allow you to go through the records, usually sequentially, until some end state is reached. Loops allow you to go through the records, usually sequentially, until some end state is reached. Make sure and put an end state in or you may end up in an infinite loop! Make sure and put an end state in or you may end up in an infinite loop! Here’s an example script with two exit conditions, if the criteria is found or if we get to the last record without finding it Here’s an example script with two exit conditions, if the criteria is found or if we get to the last record without finding it

Loops So let’s analyze this in detail So let’s analyze this in detail  First freeze window this a performance enhancer it keeps us from having to redraw the screen every time  Next we go to the first record this is because we have no idea what record the user is on

Loops  Notice that first record is outside of the loop, can anyone tell me what would happen if this was inside the loop?  Notice the goto field step? It is not necessary but it does make it easier to read  Next is our conditional it prints out a box if the record is found and then exits the script, the exit script was done so that we can put some stuff after the loop to be done in case the record is not found.

Loops  Finally in the gotorecord(ExitAfterLast,Next) you’ll notice the ExitAfterLast box is checked that means it will exit when the last record is hit (our second check)  While this is a trivial example(it is essentially a find) it does show good looping practices

Loops  Finally in the gotorecord(ExitAfterLast,Next) you’ll notice the ExitAfterLast box is checked that means it will exit when the last record is hit (our second check)  While this is a trivial example(it is essentially a find) it does show good looping practices  To show the true power of a loop we need a way to set the information

SetField  SetField this let you change any field, regardless of whether it is on the current layout or not.  You can use it without loops, an example would be if you have a mailing address and billing address and you don’t want to have to type the whole billing address if it’s the same instead you can have a button that has a series of setfields that sets the billing street to the mailing street etc.

SetField  With loops SetField allows you to reformat or fix fields based on other fields, or that field.  There is another script step that is similar but requires no loop: replace  Replace is faster but it is easier for a careless mistake to ruin data  With replace you have to use a calculation to determine which to replace, with set field that calc can be done within the loop.

Import  You can import from a number of different sources I won’t go over the specifics of the sources since they differ across mac and pc and also among the different versions  Flat File = a textual representation of the information in a database usually with tabs between fields and CR(a return) between records.  The above is usually the type of output you would get from Sys200 or from a scanner.

Import  I recommend starting with tab-deliminated files(mentioned above)  You can get excel to export in this way the advantage is you don’t have to worry about versions.  Beware the mac version of FMPro has problems reading certain types of files, if it doesn’t work open it with BBEDIT and save it with BBEDIT

Steps for Importing  While I am going to give the steps manually I strongly recommend you make a script for your users.  Go to File…Import/Export…Import records  Select your file and then…

Steps for Importing  You will be presented with a screen like this:  You can scan through the data using the >> buttons  You can choose on the bottom to have the new data replace the old or be added to.

Steps for Importing  You will see an arrow -> next to any data that is going to be moved over you can uncheck it to not move that info into your database (e.g. if there is a field in the text you don’t need in your db)  You can move the fields around also if they don’t seem to match up with the ones that you were given  When you’re done select import  Next you will be presented with another screen, this screen asks if you want to perform autoentry actions, usually you will want to do this as it will fill in all your calculated fields.