When you schedule an update for a timeline item do you get a unique item id or the same one?
My question is can you chain multiple updates after one another and get unique ids? https://developers.google.com/glass/v1/reference/timeline/update
The current result isn't clear in the current documentation.
This way if a user stops the process you can easily access all the future timeline items and delete them?
The same one.
If you update a timelineItem via update or patch, the item which is returned will have the same ID that you passed in.
Related
I am new to Angular and I am now learning about directives.
I have created a directive that will create a table.
You can sort the table by clicking on the header arrows.
You can also edit/delete a row by clicking on the action button.
The problem with my table is that when the rows are sorted by some column,
and I edit an item under that column, the table resorts because of the changed data. Thus my currently editting item moves to another row and the current input fields contain a different one.
For example, if I sorted the table by visits, and then I edit a visit data in a row,
changes to :
How can I maintain the current order of the rows during edit,
and only allow resort when I click on the apply button (check) ?
You can copy the model which will be edited during editing. And in your save function, update the actual model in table list.
put the case that my glassware app posts news to n users.
As soon as I parse a new news i will insert the new card into user's timeline.
Now put the case that I want to organize the news cards for category ( Sport, Politics, ... )
so now each time I post a new card I want to either post a new cover card or update the already posted one.
Given that as far as i understood the platform each cover card has a unique id per user this means the I need to store server side the id for the cover card for each user and upon update retrieving it and post the update method.
Is this correct or there is another approach I am missing?
KR
What you describe is probably the easiest method - keeping track of the cards that have been inserted for each user. It isn't, however, the only solution available. Glass provides two additional fields that you have control over, sourceItemId and bundleId, which you can use to insert cards into the Timeline and fetch them out later.
The sourceItemId field lets you set each card to an ID that represents the same card in your database. So you would create a news item, assign it an ID in your own database, set this as the sourceItemId, and insert this for each user. If you want to get the specific card that represents this item for each user later, you can use timeline.list and search by sourceItemId.
The bundleId is the ID you assign to each card which will be in a bundle to group them together, so multiple cards will have the same bundle ID. You can use timeline.list again and specify the bundleId to get all the cards in the bundle and then identify and update the one which is marked as the cover card.
When I merge accounts, I want to trigger an outbound message. When I merge account, there is 1 record that is updated and and the other record that goes to recycle bin. I want to fetch Record Id of one that is merged with and the one that is updated. Is it possible with any conditions or do i need to code?
Yes you need to write a trigger for this although a rather simple one.
As stated in documentation merge doesn't trigger they own event instead delete and uppate events triggered.
From Documentation :
To determine which records were deleted as a result of a merge operation use the
MasterRecordId field in Trigger.old. When a record is deleted after losing a merge
operation, its MasterRecordId field is set to the ID of the winning record.
Link to full page
I followed this great guide to help me add a search feature to my Access database:
http://www.techrepublic.com/blog/howdoi/how-do-i-populate-an-access-list-control-with-the-results-of-a-dynamic-search/108
At the end it says:
"If you’re building a quote or order, use the list control’s Click or Double Click event to copy record(s) to a temporary table. It’s easy to implement using a fixed query for each search task."
I have managed to display all search results in a list box and I would like to be able to click on a customer to highlight them, and then press a button to add an order to the selected customer. I've been thinking how I could do it and I really can't get my head around it.
Any help would be appreciated.
It depends on how you build your database. My guess is that one easy way would be:
Create a table with customers;
Create an "Order" table with orders where you link the customers through a foreign key
You load the customers in a listbox. While making the name visible, it is actually the ID that you retrieve when clicking the listbox. You can configure this via the wizard in the design view of a table. You can make other forms appear by events on the listbox (eg. on click).
If you managed to retrieve the ID of the customer, and you have the data related to the order (data that can easily be extracted from form objects and loaded into variables ) what you need is an insert statement and insert the values in the "Order" tabel (including the customer ID, which is linked through the foreign key).
This way all order records are linked to the customer and can be queried later.
Due to my limited knowledge on your other requests, I cannot help you any further on the rest of your database design.
I hope that my reply could help you and that I understood your question correctly.
You can access info from a listbox via:
List.Value
Or if it is not the first column then:
List.Column(0,0)
0 being the column and row references.
You may also consider using a listview over a listbox and then you can access the relevant parts of a listview control with the following code:
ListView.SelectedItem
Or if it is not the first column then:
ListView.SelectedItem.SubItems(3)
3 being the column reference
I want to know how to save edited values in sql server to return to it's value after that.
For example:
I have the user which it's status is working, after an year it's status is "Closed" the status is saved as an id in table user when it is working the id of status is 1 when it is closed i update the id to 2. how can I see that this user from date to date was working and now he is closed.
Thanks for your replies.
You got my question.
But the problem here is that I give here only one example which was user status, but the problem is that I have so many tables which I change they id's. For example I have Id of city, or Id of products etc.
If I save it at the same table of user for example I lost user id because every time I update user it will take a new id, or if I do a user status table I will do 20 or more tables like user status history. Also I want to save the text not only id's. For example the user got e new address I want to say from this date to date he was at previous address and now-days hi live in another place.
Any suggestion please :).
Your question is very unclear, but I think you mean "I have a User table with a Status column, and I need to see a history of status changes because when I change the Status value for a specific user, I lose the previous value".
If that's correct, one simple solution is to add a second table called UserStatus or whatever, and INSERT a new row into it every time the user status changes. You can then easily see the complete history of status changes for each user, and you can also find the current status for any user by querying the 'newest' row for that user.
In principle, the Status column on the User table would be unnecessary if you add the UserStatus table, so you could remove it. If that isn't possible (e.g. you don't control the applications using the table), then you can add a trigger to the User table that populates the UserStatus table automatically when you UPDATE the Status.
My suggestion is to have two columns
One is working/date and closed/date so that you can maintain the history of data.