I've got a class called music festivals. I want to make two inferred subclasses based on the ticket price of these music festivals. So I created a data property with it's domain "musicFestivals" and range is a value integer.
Now I create a new class called "betaaldFestivals" which means festivals which are paid. But lets say I want to categorise on the price. So when its higher than 30 I want to them to be paid and when its lower it should be the other class. However Im getting the same error over and over again. Second screenshot provided. I couldnt find any answers further on the internet because they the answer should be: "Muziekfestival and heeftMuziek some integer[>= 30]".
I tried making the value restriction with class expression editor (second screenshot) and the data restriction editor.
Thanks !
Your error message says:
encountered integer at line 1 column 37. Expected one of Class …
That strongly suggests that you've declared heeftMuziek as an ObjectProperty rather than a DatatypeProperty. If the range is an integer, then the property needs to be a DatatypeProperty, not an ObjectProperty.
Related
Sample Sheet
How do you reference the Data Import tab and display everything in order of most recent date at the top within the Worksheet, and alphabetize the Vendor Name (column C - Worksheet)?
I have tried the SORT function but little to no luck as it just alphabetized everything in order even when referencing the Import Date from the Data Import.
For visual reference
FIGURE 1:
FIGURE 2: Expected Outcome
To further elaborate:
This one might be tricky, but Column B will be hyperlinks and also needs to be in the correct order that also belongs to its proper data brethren. This is what I currently have and just references everything in order of new data incoming.
(=ARRAYFORMULA(IF('Data Import' !A:A<>"", HYPERLINK("Some_Website" & 'Data Import'!A4:A&, 'Data Import'!A3:A), ""))
This one I'm guessing will not only need to reference the date, but the naming order as well.
Okay. So this was resolved with the query function.
Source info: https://support.google.com/docs/answer/3093343?hl=en
The sample sheet will remain open to those who are in need of knowing how to use it and can view how it was used.
Doing this resulted in the expected outcome. However, there is an issue.
If you have other columns you intend to put manual data entry, this entry data will remain stagnant and will not move.
Only the columns with the query formula will be dynamic and will keep getting pushed downward while your stagnant entries will remain right where they are.
I'm currently looking into Assigned Index Numbers to resolved this.
Solving the Dynamic / Static Data Alignment challenge using Alignment Index Numbers
Currently working on making a portfolio tracker.
im looking probably for a if statement that will change my Quantity of shares held to a negative if another column is labeled as 'SELL'. You can see from the image provided, the right column is what im looking for.
simple IF switch:
=IF(B2="sell"; GOOGLEFINANCE()*-1; GOOGLEFINANCE())
My goal is to have a TGrid with several columns, connected to a TClientDataSet via LiveBindings. One of the columns is of type TProgressColumn.
The grid displays the data, but the progress bar column shows nothing (i.e. 0% progress).
The TProgressColumn is connected to a field of type ftInteger. The values in this field are between 0 and 100.
I've tried with ftSingle, but with no luck.
I set the type of the column to be TProgressColumn via ColumnStyle property, available under TLinkGridToDataSourceBindSourceDB/Columns.
The strange thing is that when I use TPrototypeBindSource to generate values - the TProgressColumn works, but only for ftUInteger values. It fails for ftInteger generators.
Here is a little demo (Delphi XE7):
When I put a breakpoint in TProgressCell.DrawCell() and step over the two conditions for Value.IsOrdinal and Value.IsType are skipped and ClampValue receives a value "Min" which is 0.
There seems to be something wrong with the value, passed to the function.
Is there something special when working with TProgressColumn? Do I need to use CustomFormat, CustomParse in TLinkGridToDataSourceColumn?
Is that a bug or I miss something?
UPDATE:
Thanks to "nompa" the mystery was solved!
In fact "asInteger" is the well known property of the TField class i.e.:
someDataSet.fieldByName('myFieldName').asInteger
In CustomFormat property you can get access to many things, including self.asInteger properties.
More information here:
Using Custom Format and Parse Expressions in LiveBindings
Using binding expressions in the CustomFormat property of a TLinkPropertyToField component
Formatting your Fields
How to treat an Integer field as a Boolean?
The value is string by default, not matter is a integer field. In property CustomFormat write AsInteger.
The value will be take as integer and the progress now is visible.
I'm attempting to run Interactive Broker's included code sample.
http://www.interactivebrokers.com/download/JavaAPIGettingStarted.pdf
On about page 42 it details how to pull market data feeds. My question is, has anyone successfully put in the parameters needed to pull currency pair data??
public synchronized void reqMktData(int tickerId, Contract contract, String genericTickList, boolean snapshot)
I cannot find the valid inputs that will correct the errors I'm seeing from the client.
Parameters needed
List of values inside Contract class are here : https://www.interactivebrokers.com/en/software/api/apiguide/java/contract.htm
STK == "stock" , should this be set to CASH for Forex data?
IDEALPRO == the exchange according to this page : http://ibkb.interactivebrokers.com/tag/fx-trader
USD.JPY = SYMBOL (this here is a guess on my part)
USD == "underlying currency" , here I am guessing again.. seems the currency needs to match the transaction currency.
the pair in the format Transaction Currency.Settlement Currency (example: EUR.USD). The Underlying column will display only the Transaction Currency.
After scouring IB's forum I have found something that works for FX data feeds. You need to put the TransactionCurrency as the Symbol, and the SettlementCurrency as the underlying in the dialog box.
Here is the resulting data feed
As I can remember, I used: CASH, IDEALPRO, EUR.USD, USD
You can see all parameters example in the TradeStation client. Just find the needed instrument and look at it's properties.
And remember that not all parameters must be necessarily filled
At the worst, show the error.
When choosing 'Add' in CRUD, how best to generate a list of choices to pick from a dropdown?
For U/update - just display what's there...
The field contents starts with a letter, followed by five numeric digits:{A-I,K-N,Z}#####
Each letter has a different 'max' value for the numeric part.
So when adding a new record, I'd like to offer a listbox with one of each letter and that letter's highest numeric value + 10.
So, if the max 'A' as A00120, and max 'B' B00030 (etc) the listbox would have A00130 and B00040.. etc
Save the user having to figure out which is 'next' when generating a new record.
? Thanks,
Mark
This time I'll not be able to come up with ready to use solution, but I must say - everything is possible with ATK4. You just have to customize and extend it to fit your needs :)
Speaking about your question above - I guess you have to split it in multiple parts.
First part is about how to show select box on Create and readonly or disabled field on Update. I guess you can make some custom Form field or pin some action to existing Form Field hook. Not sure exactly what's better in this case.
Second one is about data structure. I believe that this field actually should be 2 fields in DB and maybe (only maybe) merged together in ATK model with addExpression() just for user interface needs to display these 2 fields as one field easily in UI. Maybe such concatenated field will be useful also for searching, but definitely not as only one field stored in DB. Imagine how hard it'll be for DB engine to find max value if such field. Store it like type = letter, num = number and then search like SELECT max(num)+10 FROM t WHERE type='A'
Finally Third part is about how to generate this next number. I read your question 3 times and came to conclusion that actually you don't have to show this +10 numeric value in UI at all if it's hardly predefined anyway. Actually that'll not work correctly if this will be multi-user system which I guess it will. Instead just show simple select box with letters {A-I,K-N,Z} and calculate this next value exactly before inserting data in DB. That can be done using models insert hook. This will be much more appropriate solution and will be better for UI and also more stable because calculated in model not incorrectly in UI part.