Jump to content

MikeN

Members
  • Posts

    5
  • Joined

  • Last visited

MikeN's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I have a tabular report containing afield that has a lookup table associated with it (1 to many relationship). How do I do a search in the table for rows that have a value that is contained in a lookup table. E.g.I have lookup table of Department ID & Department name. In my tabular report of employees with Employee ID, Employee Name, Department ID (each employee belongs to a particular department) I want to search for Employees belonging to a department, using the department name rather than Department ID. And I want the search to be able to use "Contains" e.g. bring up all Employees with "Admin" in the Department name, as there are a number of Departments with "Admin" as part of their name. e.g. Postal Admin, Finance Admin. Apologies if it's a rookie question !
  2. Don't forget to disable Ajax to force the javascript to be executed every time the page is displayed, otherwise it is often only executed if you refresh the page.
  3. Solved ! Now displaying user-specific logos. After quite a few hours experimenting, now I can display logos (or whatever) in a Header in a Results page, that can be conditional on a table value. The trick was to set variables & use document.write(variable). <script> // var1 is the Company A logo (it's clickable & takes you to the home page) // var2 is Company B logo (it's clickable & takes you to the home page) var1='<img alt="" src="https://URL of Company A.png" style="width: 301px; height: 61px; vertical-align: top;" /> <br />&nbsp; &nbsp;Welcome [@authfield:User_Name] to your Company A account &nbsp; &nbsp; &nbsp;&nbsp;<a href="https://URL of Caspio logout">Logout</a>' ; // var2='<a href="http://URL of CompanyB/" target="_blank"><img alt="" src="http://URL of Company B logo.jpg" style="width: 100px; height: 80px; vertical-align: top;" /></a>&nbsp;&nbsp;<br />Welcome [@authfield:User_Name] to your CompanyBname account, powered by&nbsp;<a href="https://mycompanyURL home page" target="_blank"><img alt="" src="https://my company logo.png" style="width: 50px; height: 10px; vertical-align: middle;" /></a> &nbsp; &nbsp; &nbsp;&nbsp;<a href="https://URL of Caspio logout">Logout</a> '; // Check company name in order to display appropriate logo // Name obtained from user profile if("[@authfield:Customer_Company_Name]" == "CompanyAName"){ document.write (var1) } if("[@authfield:Customer_Company_Name]" == "CompanyBName"){ document.write (var2) } </script>
  4. Want to display a different header according to value of field from user authentication. Code logic works fine, but the HTML I want to be executed does not work. Here's a sample script. The Italics part after the "if" statement works well on its own, but with the conditional code, it is ignored. Rules can't be used (I think) as they do not operate with Header or Footer blocks in a Data Page. <script> if("[@authfield:User_Company_Name]" == "ABC Ltd"){ Welcome [@authfield:User_Name] to your account &nbsp; <a href="https://www.myurl1/" target="_blank"><img alt="" src="https://myurl2.png" style="width: 50px; height: 10px; vertical-align: middle;" /></a>&nbsp;<a href="https://Myaccount.caspio.com/folderlogout">Logout</a> } Else{ Display an alternative header } </script> Many thanks for any help/advice you may be able to give!
  5. I am using a Tabular Report to view data, and update some fields. There is a field I want to use as a unique key to a lookup table and display the description from the lookup. For example, I have rows of data regarding trees. For field tree_name e.g. "Oak Tree" I want to display the Latin Name which would be contained in the lookup table "trees_and_latin_names" with key of tree_name (and another field with the Latin Name in it) . Having solved this, if there is no value in the Tabular Report, I'd like the user to be able to type in their own value, this being written to their own data (not the lookup table "trees_and_latin_names". Any help would be appreciated ! Thanks, Mike.
×
×
  • Create New...