Jump to content

ISlp59lp

Members
  • Posts

    8
  • Joined

  • Last visited

ISlp59lp's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. This isn't quite what I need. Think of a basketball game where there is a home team and an away team. I want the user to input one team name. Then I want the search to work so that it displays all games where (home team = team) OR (away team = team)
  2. ISlp59lp

    Search By Year

    I've tried to simplify the search to see if I could get something going - no go yet - still need help. Using Search and Report Wizard: - Select Search Fields: VE_game_sportid, VE_game_gamedatetime - Configure Search Fields: DataPage Elements Virtual1 - Dropdown (custom values: 2014,2013,2012,2011) VE_game_sportid - Hidden, Default Value = 1 VE_game_gamedatetime - Hidden, precision = Date Footer is this code: <script language ="JavaScript"> function setdate () { Stamp = new Date(); console.log("yippee"); year = document.getElementsByName('cbParamVirtual1')[0].value; console.log("input year: %s",year); if (year == "") year = Stamp.getFullYear(); console.log("set year: %s",year); var y = document.getElementsByName("VE_game_gamedatetime"); y.precision = "Year"; console.log("y: '%s'", y.precision); fulldate = year; y.value = fulldate; console.log("Date: '%s'",y.value); } document.getElementById("caspioform").onsubmit = setdate; </script> Still the results of this are for all years, not just the selected year. What am I missing?
  3. ISlp59lp

    Search By Year

    I did something a little different -- (but it doesn't seem to work...) I created virtual fields for the year-month-date selections, then modified the value of the gamedatetime field and also the precision of the gamedatetime field. (See below.) But, the results select all dates, not restricted to year or month-year. <script language ="JavaScript"> function setdate () { Stamp = new Date(); year = document.getElementsByName('cbParamVirtual1')[0].value; month = document.getElementsByName('cbParamVirtual2')[0].value; day = document.getElementsByName('cbParamVirtual3')[0].value; if ((year !== "") && (month !== "") && (day !=="")){ document.getElementsByName('VE_game_gamedatetime').precision = "Date"; alert(document.getElementsByName('VE_game_gamedatetime').precision); fulldate = month + "/" + day + "/" + year; document.getElementsByName('VE_game_gamedatetime').value = fulldate; alert(document.getElementsByName('VE_game_gamedatetime').value); } else if ((year !== "") && (month !=="")){ document.getElementsByName('VE_game_gamedatetime').precision = "Month and Year"; alert(document.getElementsByName('VE_game_gamedatetime').precision); fulldate = month + "/" + year; document.getElementsByName('VE_game_gamedatetime').value = fulldate; alert(document.getElementsByName('VE_game_gamedatetime').value); } else { if (year == "") year = Stamp.getFullYear(); document.getElementsByName('VE_game_gamedatetime').precision = "Year"; alert(document.getElementsByName('VE_game_gamedatetime').precision); fulldate = year; document.getElementsByName('VE_game_gamedatetime').value = fulldate; alert(document.getElementsByName('VE_game_gamedatetime').value); } sportid = document.getElementsByName('cbParamVirtual4')[0].value; schoolname = document.getElementsByName('cbParamVirtual5')[0].value; oppschool = document.getElementsByName('cbParamVirtual6')[0].value; document.getElementsByName('VE_game_sportid').value = sportid; document.getElementsByName('VE_school_schoolname').value = schoolname; document.getElementsByName('VE_Lookup_School_schoolname').value = oppschool; alert(" sportid " + document.getElementsByName('VE_game_sportid').value + " school " + document.getElementsByName('VE_school_schoolname').value + " oppschool " + document.getElementsByName('VE_Lookup_School_schoolname').value); } /* onload=setdate; */ document.getElementById("caspioform").onsubmit = setdate; </script>
  4. I'm using a search and report data page to show specific ball games. User can select the sport to be "football" or "basketball". User can select a game date. User can select a school name. My table of games lists sport, date, home school, and opposing school. (The list of valid school names is the same for both home school and opposing school.) In my search and report data page, the results are selected to be "Results that match all criteria (AND)". How do I setup the search such that the user can insert one school name and the report will contain any games where the school name shows up in either the home school OR opposing school? That is, I want my search to be "sport" AND "date" AND ( (schoolname = "home school" ) OR (schoolname = "opposing school") )
  5. ISlp59lp

    Search By Year

    MayMusic, Thanks - I found the Precision field. My next question is, can this be changed dynamically? I actually have three drop down created (year, month, date). One user might select just the year. Another user might select both the year and the month. Is there a way to change the precision value of the field on the search page to match what the user has input? Or, are there some default values that would work? (for instance, if year is selected and month is not selected, yet the precision is set to Month and Year?)
  6. ISlp59lp

    Search By Year

    I'm using the Search and Report Wizard. I have a table(tbl_game) with one column containing a datetime field. (ex: 09/25/2009 18:00:00) I have created the search form with a dropdown that allows user to select specific year (ex: 2009) Now, how do I generate the search such that the report yields only those records with the selected year (ex: only 2009 games)?
  7. I'm working on a basketball games database. I have a table that lists schoools: TBL_SCHOOL { schoolid, schoolname } I have another table that lists games: TBL_GAMES { gameid, gamedate, visitorschoolid, homeschoolid } How do I set up a view and/or datapage that will show: gamedate - visitor schoolname - homeschoolname ???
  8. I have a database of a football roster. The player numbers are like: 1, 2, 3, 10, 11, 20, 30,... Yet, when I sort them in the datapage, the results are: 1, 10, 11, 2, 20, 3, 30, ... How can I get the desired results of: 1, 2, 3, 10, 11, 20, 30, ... Note: football numbers are 1, 2, 3 -- not 01, 02, 03
×
×
  • Create New...