Hello guys can anyone help me to implement Recyclerview using two database table's (like users and posts). Am making Search in my project where user can find persons and post. Here is an Example :
See this example
in above link there is an image where first two rows are user and after that all are posts. I want somthing like that. I know how to join RecyclerView with a single table and need Hint to join two or more table to a single RecyclerView. Thank you in advance.
Related
I have two tables: Users and Tasks. Each User can have many Tasks but every Task can have only one User.
If I click on John Smith in the first layout I'll be taken to a new layout that shows me only John's tasks (thanks to "Go to related record" script).
Now, what I'm trying to accomplish - and need some help with - is from this layout I would like to be able to see a scrolling list of all John's tasks on the left (but only their titles). When I select, say, Task 20 I want to see all of Task 20's metadata on the right. In other words, a master-detail view like this:
I followed this video tutorial​ which got me close to my goal but not all the way. If you skip to the 6:20 mark you can see what he does. But basically his approach is this:
From the Contacts layout he creates a portal.
He creates a summary field called listOf and chooses to create a "List of" IDs from the Contacts table
He creates a relationship from the ID field and the listOf field
He populates the portal with this data
He uses a script to "Go to related record" when the user clicks on a button in the row
This approach works great for the master-detail view, but it has one problem for me. I don't want to see all tasks, just John's tasks (or whoever I clicked on in the previous layout).
Not sure how to solve this. Do I need to create a "Constrained found set" when I navigate from John Smith's record in the previous Users layout?
First, I would have a standard portal on the left, using a cartesian join to show all records, or you can use this technique with the summary field if you wish, but it is not necessary.
Then add a filter to the portal to only display records with the same User ID as the current record. This will accomplish what you need.
I would like to create a sub-form in which there are links to another table inside the fields of a column. This is pretty much as it is in the Northwind Database sample of Access, in where in the 'Home' form there are two tables and, in the product table, there are links to the product details.
My question is how to create those links first, and how can I make my forms to 'pop-up' in smaller windows as there is in this example?
I will appreciate a lot the help, thank you very much in advance.
Jim.
Edit with images:
The main page of the Northwind database looks like this. My concern is about the links on 'Products', that their show information of the selected product. When you click on the desired product, it opens a form with the information about the product but in a new window, like this:
Here there is the form when you click on the name. I'm looking into the tables and subforms of the database but I can't find clues about how was this done. Meanwhile I'm reading various tutorials of Access but for the moment there's no success on that. Hope it's clear what I'm trying to show. Anyone has any clue about how can this be done? Thank you very much.
Edit 2: I've solved the pop-up window for the forms, so I can manage to do this. Now I'm struggling on finding how to link those fields of a table with other forms. The hyperlink doesn't seem to allow me to do it. Any clues? Thank you
I have built a table in Access that is populated by the end user with a form. Next, I would like the end user to retrieve a record and be able to edit the fields in form view.
I see stackoverflow user Hoops asked a similar question, excerpt:
"What I want to do is have the user select a record from the combo
box, which then populates the textboxes (I've already managed to do
this)."
His "already managed to do this" is what I need to know.
I tried using a combo box, but it did not populate the text boxes, and when I selected multiple columns to be displayed, the fields could not be edited.
I tried using a parameter query to retrieve a search record, but I could not get results to display in the form.
While I know I am supposed to ask specific answerable questions, what I really need to know is the method or strategy I should be using to retrieve a record and be able to edit the fields in form view. If I know the best method, I can usually figure out the tactical.
Thanks for any ideas.
Melissa
I suggest a split view form in Access. More info can be found here: http://office.microsoft.com/en-us/access-help/create-a-split-form-HA010075994.aspx
I am a Django noob and have a situation that goes beyond the basic documentation, etc.
I am updating an ordering webpage that has a form structured as follows:
several text boxes, etc to gather general info (name, date, etc)
two separate tables for selecting (via checkbox) catalogs that are generated/managed using endless_pagination. Each table can have thousands of records, hence the endless_pagination. The first column in each table is a checkbox with value = catalog.id.
a textbox where the user can manually enter catalog IDs
a submit button
I am not sure how to keep track of what a user has selected in the two paginated tables since the checked boxes are lost when choosing a different page. Also, when the user flips back and forth between the pages, the previoulsy checked catalogs will need to be re-checked(since the checked state is not maintained). I am also not sure which tool(s) to use to deal with this.
My thought is to use JavaScript (with which I have minimal experience) to update a list of catalog IDs whenever a checkbox is checked/unchecked and:
- and attach that list to the form or
- update a variable in the form or
- send as a variable separate from the form, whichever is possible/makes more sense.
I'm hoping that maintaining a list of catalog IDs is possible because the next iteration of this form will likely include some sort of filtering so I'm trying to devise a solution that will not have to be reworked later.
I have reviewed a lot of posts but I believe the closest solutions are rendered useless because of the endless_pagination.
Let me know if further clarification is required. Thanks in advance for any suggestions.
UPDATE
I tried using JavaScript to store the catalog IDs in an array when a checkbox is checked. This does not work when a user selects another page in the pagination. The array of checked catalog IDs is lost when the page 'reloads'.
I'm running into this problem right now as well. I'm handling this by writing the checked items to localStorage so they carry across to page 2, 3, etc.. as well as show up as already checked when you go back to page 1. Then every time the page loads, either find and check the existing checkbox, or create a hidden input with the appropriate name and value and append it to the main form.
var selected_items = []
function add_item_to_checkbox(item) {
localStorage.setItem('selected_items', JSON.stringify(selected_items));
checkbox.on("click", add_item_to_checkbox);
bahh... Just look at my jsfiddle it's easier to read and yeah. I don't have to type JS into a textarea on stackoverflow.
Here is my javascript minus a few things that are specific to my code. I'm sure it could be improved upon but it works really well for my application.
I want to make an iPhone app just like a questionnaire/Quize, and want to store all questions in sqlite database , i need to have One question that can be a label and 4 radio buttons for answers, user will select the option and will go for the next question, questions and answers will be saved in sqlite and at the end user will come to know how many he made correct or wrong choices.
Please suggest me any tutorial or anything that can be help full for me,please guise i will be grateful to u for this kindness in advance.
Just make a database with a table with columns like so : id, question, answer1,answer2,answer3,answer4,correct answer, did answer correct;
If you don't know SQL just use a wrapper like FMDB
After that just us use the built in function to get from database the question with a certain id (i.e. question number) and pass that to your question-asking class . When the user presses on an answer, check if it's correct and modify "did answer correct" columns.
Break your project into set of questions:
1. How to create GUI in iPhone?
2. How to connect to database in iPhone?
3. How to create label, radio buttons in iPhone?
4. How to submit form in iPhone?
Etc.
Then search the web for each of these. Perform these examples individually, test them and combine them.
Voila you've got a brand new questionnaire application :)!!!