Comments (11)
Oh better not for sec and privacy concern. The XML file should be enough :)
from filemaker-ruby.
Quite strange, what's the data type for DaysWorkdaysInWeek
?
Do you have the <metadata>
XML where we can inspect, like this?
<metadata>
<field-definition auto-enter="yes" four-digit-year="no" global="no" max-repeat="1" name="status" not-empty="no" numeric-only="no" result="text" time-of-day="no" type="normal"/>
</metadata>
from filemaker-ruby.
The metadata looks like this:
<metadata>
<field-definition auto-enter="yes" four-digit-year="no" global="no" max-repeat="1" name="_id" not-empty="no" numeric-only="no" result="text" time-of-day="no" type="normal"/>
<field-definition auto-enter="no" four-digit-year="no" global="no" max-repeat="1" name="_id_Country" not-empty="no" numeric-only="no" result="number" time-of-day="no" type="normal"/>
<field-definition auto-enter="yes" four-digit-year="no" global="no" max-repeat="1" name="DaysWorkdaysInWeek" not-empty="no" numeric-only="no" result="number" time-of-day="no" type="normal"/>
<field-definition auto-enter="no" four-digit-year="no" global="no" max-repeat="1" name="ShortName" not-empty="yes" numeric-only="no" result="text" time-of-day="no" type="normal"/>
</metadata>
I have been trying out different data types in the model, but with no change
from filemaker-ruby.
Your data type for DaysWorkdaysInWeek
and _id_Country
are both number, maybe you can try number
or integer
:
number
are Ruby'sBigDecimal
under the hood, good for money or floating pointinteger
are just plain integer
string :supplier_id, fm_name: '_id', identity: true
integer :country_id, fm_name: '_id_Country'
string :shortname, fm_class: 'ShortName'
number :workingdays, fm_class: 'DaysWorkdaysInWeek'
Other than that, you can write some debug statement at this file: https://github.com/mech/filemaker-ruby/blob/master/lib/filemaker/metadata/field.rb
to see if that help.
from filemaker-ruby.
Thanks for your help so far!
So I made the coerce function output both the value and the datatype, and it returns it just fine:
2.3.4 :006 > Supplier.first
curl -XGET 'https://.../fmi/xml/fmresultset.xml?-db=...&-lay=web__Supplier_Rails&-max=1&-findall=' -i
ETHON: performed EASY effective_url=https://.../fmi/xml/fmresultset.xml response_code=200 return_code=ok total_time=0.021081
SU000005
text
259
number
5
number
ANS
text
SU000005
259.0
ANS
=> #<Supplier:0x007f94cdac9428 @new_record=false, @attributes={"supplier_id"=>"SU000005", "workingdays"=>nil, "country_id"=>"259.0", "shortname"=>"ANS"}, @relations={}, @record_id="6", @mod_id="1480", @portals={}>
I've changed the data type to number and integer with no effect.
Any more hints?
from filemaker-ruby.
Are you able to provide me with the whole XML file with your private information removed so that I can put it through the spec to run some test?
from filemaker-ruby.
Here you go:
<fmresultset xmlns="http://www.filemaker.com/xml/fmresultset" version="1.0">
<error code="0"/>
<product build="4/5/2017" name="FileMaker Web Publishing Engine" version="16.0.1.184"/>
<datasource database="..." date-format="MM/dd/yyyy" layout="web__Supplier_Rails" table="..." time-format="HH:mm:ss" timestamp-format="MM/dd/yyyy HH:mm:ss" total-count="161"/>
<metadata>
<field-definition auto-enter="yes" four-digit-year="no" global="no" max-repeat="1" name="_id" not-empty="no" numeric-only="no" result="text" time-of-day="no" type="normal"/>
<field-definition auto-enter="no" four-digit-year="no" global="no" max-repeat="1" name="_id_Country" not-empty="no" numeric-only="no" result="number" time-of-day="no" type="normal"/>
<field-definition auto-enter="yes" four-digit-year="no" global="no" max-repeat="1" name="DaysWorkdaysInWeek" not-empty="no" numeric-only="no" result="number" time-of-day="no" type="normal"/>
<field-definition auto-enter="no" four-digit-year="no" global="no" max-repeat="1" name="ShortName" not-empty="yes" numeric-only="no" result="text" time-of-day="no" type="normal"/>
</metadata>
<resultset count="161" fetch-size="2">
<record mod-id="1480" record-id="6">
<field name="_id">
<data>SU000005</data>
</field>
<field name="_id_Country">
<data>259</data>
</field>
<field name="DaysWorkdaysInWeek">
<data>5</data>
</field>
<field name="ShortName">
<data>ANS</data>
</field>
</record>
<record mod-id="1390" record-id="7">
<field name="_id">
<data>SU000006</data>
</field>
<field name="_id_Country">
<data>243</data>
</field>
<field name="DaysWorkdaysInWeek">
<data>5</data>
</field>
<field name="ShortName">
<data>CCE</data>
</field>
</record>
</resultset>
</fmresultset>
from filemaker-ruby.
Oh FileMaker 16. I do not have it. I only have FM 15. I may need to upgrade first. Probably something changed between the version. I will test it regardless and let you know the outcome.
from filemaker-ruby.
Want me to create a user for you on our system for testing purposes?
from filemaker-ruby.
I'm so sorry, but this is a typo on my end. In the model, I'v managed to type fm_class
instead of fm_name
. It worked beautifully when I changed that.
Sorry again for the trouble caused!
Andreas
from filemaker-ruby.
Oooo.. great
from filemaker-ruby.
Related Issues (11)
- error with rails HOT 1
- clear_changes_information HOT 4
- Update nokogiri dependency HOT 1
- Editing records HOT 1
- Able to search for work month
- replace_new_data is broken!
- `where` isn't properly searching records HOT 5
- belongs_to doesn't seem to function properly HOT 6
- Global and per-request timeout setting and parallel requests
- Container url HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filemaker-ruby.