I'm having an issue with the fields (or attributes, they used to be called) in my cloud kit database. Whenever I create a new field, the records that are stored in that field are always titled "No Name" according to the record type ("State") despite what the actual record title which is "happy" as shown here:
I already tried editing and saving the record it again but that did not work. Can anybody help clarify this issue?
When looking at actual records in the public database in the CloudKit Dashboard, it looks at the field names for that that record type (the "State" record type in your case) and tries to pick the one most likely acting as a title. If the field it chooses has an empty value, it shows "No Name" for the title.
Looking at your screenshot, it seems to be picking the first field ("WI") and showing it's value, which is not set for the selected record.
On a separate note, it seems odd that you have what look like state abbreviations as field names for your State record type. It's possible that you want an "abbreviation" field on your State record type, where the value might be "WI" or "CA".
Related
In my app, I have a Record type (UserActivity) which just stores images a user wants to save to their profile. This record type only contains a single attribute - a CKReference to another record type (RecordTypeA for example). It works perfectly...I'm able to store and retrieve the data via the references to construct the images and display it appropriately on screen. However, I just realized I need to add a second attribute to the UserActivity record type, which will be a CKReference to a different record type (call it RecordTypeB). Record type B is a second kind of image that needs to be separately identified. So each row in UserActivity will now have 1 of 2 possible CKReferences, but not both.
I can save the new RecordTypeB reference with no problem, but I have a couple of issues as a result. First, when I save it, whether through code or CKDashboard, the record now shows the title as "No Name" because there is nothing for the attribute for RecordTypeA. Originally, the record names would be ref:followed-by-recordid. It works as it did originally if the UA record has a reference to RecordTypeA. So is there a way to make it create the record name for RecordTypeB reference only? Is it possible that I should change this to a CKReference List now that I have a 2nd attribute? Secondly, and more importantly, when I'm retrieving UserActivity records, how can I tell for a given record if it contains a reference to RecordTypeA or RecordTypeB? Is there a way similar to the isKindOfClass method? In this case, that method just shows it's a CKReference and not what record type it's a reference to. And maybe the second question would be automatically solved if the CKReference List is the appropriate solution? Thanks in advance for the guidance!
Experience shows that the title of the record will be the first field that you created for that recordType. I haven't found any documentation about this so it could be a coincidence. If you want your title be the RecordTypeB field, then recreate your recordType and then first create RecordTypeB. There is no other way to influence what the title will be.
You could change it to a CKReference List, but i think in your case it would be easier to keep the 2 separate fields. Only when you don't mind what item is what then you should use a list. But in your case the references are 2 different types.
If you did not write one of the fields, then when you read the record and look at the reference, then it should be nil. You can't ask the recordType of a CKReference. But if you create a field for a reference, then you know what recordType it should be. Otherwise you need to create an extra field for indicating what recordType it is.
I am trying to get the value of a form field of the previous record when creating a new record.
Basically each record has a text area for notes. When creating a new record, instead of the notes field containing a static value or being blank, I would like it to pull the value of this field from the previously created record.
For example the parent model is Customer and the child model is called Stickies.
I have tried this by calling:
#customer.stickies.last.notes
When you do this everything is nil. I assume this is because when calling this in the view it assumes the last record is actually the record that is about to be saved. Anyone know how I can accomplish this.
Try using #last_note = #customer.stickies.last.notes before creating a new record and use this value to show last note.
We want to extend the bug work item template with a new field called Found In Iteration. This field, what a surprise, should contains the iteration the bug was found in. But when I created the new field of type TreePath, I got an error when importing the process template into the Team Project Collection (TPC) stating that TreePath is only a valid field type for IterationPath and AreaPath fields.
Looking at that I'm wondering if there is at least any way to add a field to a work item template that uses the iteration path as data source and stores the selected value in another field (e.g. FoundInIteration).
This is not possible. There can neither be custom fields of type TreePath nor fields refering to System.IterationPath.
I'm new to Delphi7.
When I try to use the editor's "Add all fields" feature on a TClientDataSet object a messagebox (the classic error message box) appear with the message "No value for parameter '(the name of the parameter)'".
I can't add fields using the "all fields" feature anymore.
How can I find the source of the "No value for parameter" error?
The problem is (most likely) that the ClientDataSet is not filled with any data.
Lacking data, no fields can be listed.
Do the following:
put a connection on the form. [connection1]
Connect it to a database fill in login, password, database, and whatnot.
Make the connection active. (only possible if all the connection parameters are filled in correctly).
put a table on the form. [table1]
Set it's connection property to connection1.
Set the tablename property to a valid table; set active to true.
Put a datasetprovider on the form. [datasetprovider1]
Set the dataset to table1.
Put a clientdataset on your form [cds1].
Set the providername of cds1 to datasetprovider1.
Set cds1.Active to true
Now you can select fields, because now the cds holds actual data.
I managed by myself. The TClientDataSet object had a parameter with DataType and ParamType properties both set to Unknown. Setting the parameter with correct properties solved the problem, I was able to "add all fields" again. Thanks for the answers.
I don't think any data is necessary to do what you want - and the first answer provided does not seem to include data, even though that is the original statement. You should be able to add all fields so long as you have a connection to a table, query, stored procedure or something similar.
Your question says there is no value for a parameter, and shows which parameter - although you don't say. But it is probably the parameter for a query or such. That query is failing because you are not providing a parameter, therefore you don't get any results. Of course this includes no fields.
Check the parameter in the error message.
I have a customer requirement to export the checks written in QuickBooks into a specific format because their bank allows fraud prevention by uploading a file and they verify the name on the check against what you give them before clearing it.
I looked at the QuickBooks SDK (we use the XML to communicate in general) and It references a field on the check called PayeeEntityRef with a FullName property, but typically in QuickBooks that data structure would indicate what the entity is called, not what appears on the check (Vendors have a NameOnCheck property, for example, which can be something other than their name).
Without coding up multiple test cases to demonstrate QuickBooks behavior here, does anyone have experience with getting the name as it was printed on the check? What is the best way to do it?
It's somewhat possible to get what you are wanting, but there are going to be some hiccups that you'll need to let you client know about. The main problem being that there's no way to retrieve the actual name printed on the check.
You would first need to query for the Checks/Bill Payment - Checks for the bank account. Then, using the PayeeEntityRef (I would use the ListID component) figure out which "List" the entity is on; Customer, Vendor, Employee, or Other. I don't know of any way to tell which list the PayeeEntityRef is from other than doing a query for each of the lists.
If the PayeeEntityRef is a Vendor or Employee, then you can retrieve the NameOnCheck value. The only thing you would need to keep in mind is that if the NameOnCheck has been modified AFTER the check was printed, the names will not match.
If the PayeeEntityRef is a Customer or Other name, then you have to do a little bit more. The value that QuickBooks uses for the printed name is based on what fields are filled out for the customer record. It first will use the CompanyName field if it is not null. Next, it will try to use the First/Middle/LastName fields, if they are not null. Finally, it will use the Name field as a last resort. Keep in mind that this is not the FullName field, just the Name field.
I haven't tested this with an "Other" name, as I have my clients try not to use that list, but I would imagine it's similar to how Customers work.