Most effective method for arranging information

My process involves utilizing JavaScript to take a string of 4 hyphen-delimited IDs and a string of 4 hyphen-delimited titles, then making a request for JSON data to my C# web service. Subsequently, the C# web service generates a tracker with a "pending" status and waits for user confirmation before serving up the JSON on the next request.

Once the user confirms the tracker, a dropdown menu displaying the 4 titles allows them to select the most suitable match. Upon confirmation, the selected title is passed to an ActionResult in the web service, which transitions the tracker status to "live" and adds the corresponding ID to the tracker's ID column.

Traditionally, I had the JavaScript send both the 4 IDs and titles as separate strings within the REST request, combining them in the same format in a single column in the row and later splitting them before adding them to the dropdown list.

For instance:
--Data--
ID, TITLE

SDJFJKLS83,Photoshop Digital Photographers Voices Matter
SDJFKS94k4,Adobe Photoshop CS4 Classroom Book
DJFB443B34,Adobe 65014838 Photoshop CS4 Upgrade
SDFHSKBF22,Adobe 65015634 Photoshop CS4

Javascript sends to service as:
ids="SDJFJKLS83-SDJFKS94k4-DJFB443B34-SDFHSKBF22";
titles="Photoshop Digital Photographers Voices Matter- Photoshop CS4 Classroom Book-obe 65014838 Photoshop CS4 Upgrade-Adobe 65015634 Photoshop CS4";

url =

Service Creates new Tracker Row in SQL Table
TrackerID:4
Ids: SDJFJKLS83-SDJFKS94k4-DJFB443B34-SDFHSKBF22
Titles: Photoshop Digital Photographers Voices Matter- Photoshop CS4 Classroom Book-obe 65014838 Photoshop CS4 Upgrade-Adobe 65015634 Photoshop
user: randomperson13
total requests: 1
last request: 2009-03-24 20:12:45.310
status: 0

The service then presents a dropdown list of all the titles for the user to make a selection. The tracker is updated to a "live" status, removing all but one ID from the Id's column, and doing the same with the titles column.

With the single ID and chosen title, the service can retrieve data from another SQL table.

--

In essence, I am seeking suggestions for a more efficient method of storing IDs and associated titles instead of using delimiters in a single datarow.

Thank you for taking the time to read this lengthy post :)

Warm regards.

Answer №1

To create a table called trackeritems, follow this format:

ItemID TrackerID   Code          Title
1        1       SDJFJKLS83  Photoshop Digital Photographers Voices Matter
2        1       SDJFKS94k4  Adobe Photoshop CS4 Classroom Book
3        1       DJFB443B34  Adobe 65014838 Photoshop CS4 Upgrade
4        1       SDFHSKBF22  Adobe 65015634 Photoshop CS4

In addition, maintain a separate table known as trackers with the following structure:

TrackerID     User         Requests    LastRequest             Status
   4       randomperson13     1      2009-03-24 20:12:45.310     0

Utilize SQL commands to extract all relevant items based on the appropriate trackerID and consider performing a join operation if comprehensive details are needed from both tables.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Press the button within the table as its name undergoes periodic changes

I am using Python along with Selenium to automate the process of selecting and reserving a room on a website. The site displays a table containing available rooms, and my goal is to locate a specific room and click on the corresponding button within the ta ...

Dynamically adding items in a row to a form panel using extjs

While using ExtJS 3.4, I faced a challenge with laying out three buttons in a row within a formpanel. After some research, I discovered that nesting item blocks might be the correct approach. Below is the code snippet showcasing what I have implemented: v ...

Merging two distinct tables based on user_id matching and created_at falling within a specified range of dates

In my software, I have 3 entities - User, Visit, Post. My goal is to select visits and posts that are linked to the user, within a specified time frame based on the created_at field. I also want to group them by day using groupdate for group_by_day, and th ...

Determine the total by a single column with various categories (a different column) within the same table

Below is the table that I am using to store transactions categorized by accounts: +------------+---------------------+ | Field | Type | +------------+---------------------+ | id | int(11) | | account_id | int(11) ...

Utilize the power of jQuery accordion to organize and display your table

Is there a way to integrate jQuery UI Accordion with an HTML table so that columns can be collapsible? I have tried various methods but haven't been successful. Currently, this is what I have implemented: $(".col1, .col2").addClass("hidden"); $(".s ...

What steps should be followed to upgrade node.js from version 5.9.1 to 6.14.0 in a secure manner

Our current node version is 5.9.1 and we are looking to transition to a newer version that supports ES6. Specifically, I am aiming to upgrade to at least version 6.14.0, which is known to support almost all of the ES6 features. However, I must admit that ...

Steps for Renewing Firebase Session Cookie

I am currently developing a web application utilizing Node.js/Express.js for the backend, with Firebase being used for user authentication. To manage user registration and other tasks, I rely on the Firebase Admin SDK. When a user attempts to log in, the ...

Activating/diverting DIV elements through specific functions (on a WordPress website)

I have a stronger background in HTML and CSS, but I'm struggling with coding the functionality I want to see on a WordPress page. My goal is to create a page that displays upcoming events for a specific province or region of Canada, with an interactiv ...

Data binding in AngularJS allows for easy synchronization between the model and the view

I've been working on a simple AngularJS application that includes a form with two fields. However, I've run into an issue where I'm unable to read the values entered in these fields from my controller, as I keep getting 'undefined' ...

What is the best way to reset the column filter cell in Material-Table?

Within my Material-Table, I am utilizing this unique TextField to craft a specialized filter cell for each column. My goal is to employ the endAdornment as a button that will reset the filter, but I am struggling with removing the current value. filterCom ...

Using PHP to invoke an ASP.Net MVC action

I have minimal knowledge of PHP and need to make a call from PHP to an ASP.Net MVC page for integration on the PHP page. Initially, I thought using an AJAX call would be the simplest way to implement this. However, it doesn't seem to be working as ex ...

My page is experiencing delays due to setInterval

Currently, I am delving into the world of Chrome Extension development and am faced with a roadblock in replacing elements on a live chat page. While most of my tasks are running smoothly, the one thing causing issues is the setInterval option that trigger ...

What is the best way to send multiple values via ajax?

view error screenshot Upon clicking the button, a function is called which returns certain values. These values need to be retrieved and sent via AJAX using jQuery. Below is the function that is called upon clicking the button. Within this function, anot ...

Utilizing React Navigation's Tab Navigator feature, we can enhance the user experience by incorporating

When using React navigation to switch screens with bottom tab navigations, integrating a custom SVG can pose challenges. Additionally, utilizing an image as an icon may not change color as expected. How can I incorporate an SVG file that recognizes the col ...

Establish a connection with SQL Server through pyodbc

Having some trouble connecting to SQL Server using Python's pyodbc. Here is what I have attempted: conn= pyodbc.connect('Driver ={SQL server Native Client 19.0};' 'Server = ('my server name;' ...

Is there a way for me to replace rows from a different table?

There are two tables that I am working with: TableA ID Name -- ---- 1 aaa 2 bbb 3 ccc 4 ddd TableB ID Name -- -------- 3 WWXXYYZZ My goal is to select data from both tables, but exclude any rows that already exist in TableB. The desired ou ...

Having trouble with saving data when clicking in a react.js app? Check out the codepen link provided for a

I'm currently diving into the world of react.js and tackling a small project. In this project, I'm exploring how to incorporate tagging functionality. The tags will essentially be static text associated with each transaction. My challenge lies in ...

Tips on launching a new tab in a web browser from a ctools modal form within Drupal 7

I am developing a module that includes various forms, some of which are modal forms utilizing ctools. On one particular modal form, I have a button that is supposed to open a PDF in a new browser tab, but it seems to be encountering an AJAX error. Here is ...

a solution to the focus/blur issue in Firefox's browser bug

I have created the following script to validate if a value entered in an input field already exists in the database. $('#nome_field').blur(function(){ var field_name=$('#nome_field').val(); $.ajax({ url: " ...

The function vue.findIndex is not recognized as a valid function

Encountered an issue with the findIndex() function Uncaught (in promise) TypeError: state.carts.findIndex is not a function The cartId includes rowId, qty, sizeVal, and image Methods updateCart() { this.$store.dispatch('updateCart&apos ...