I am trying to find a way to create a list report that is vertical and not horizontal, as most users access my app on a mobile phone and not a pc so they find scrolling vertically more intuitive. Is there a way to do this? I thought about adding a html snippet to do this, so ChatGPT did some code for me, shown below:
- <%
- // Fetch records where the Email field matches the logged-in user's email
- MyAvailability = Current_Availability[Email == zoho.loginuseremail]; // Filtering by email
- // Check if records exist
- if (MyAvailability.isEmpty())
- {
- return "No availability records found for the logged-in user.";
- }
- // Start constructing the HTML output
- htmlOutput = "";
- // Loop through each record in MyAvailability
- for each availability in MyAvailability
- {
- // Set the font color conditionally for the Monday11 field
- Monday11Color = "";
- if (availability.Monday11 == "Yes")
- {
- Monday11Color = "green";
- }
- else if (availability.Monday11 == "No")
- {
- Monday11Color = "red";
- }
- // Add the dynamically generated HTML for each availability record
- htmlOutput = htmlOutput + "<div>";
- htmlOutput = htmlOutput + "<h3>Date: " + availability.Mon_Date_1 + "</h3>";
- htmlOutput = htmlOutput + "<p><strong>Monday 11 AM: </strong><span style='color:" + Monday11Color + ";'>" + availability.Monday11 + "</span></p>";
- htmlOutput = htmlOutput + "<hr>";
- htmlOutput = htmlOutput + "</div>";
- }
- return htmlOutput; // Return the generated HTML to display
- %>
but I keep getting an error message at line 2, saying Error: Improper statement. error might be due to missing ';' at the end of the line or incomplete expression.
Is this the right way to do this, or is there another way to do it?