Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
citizen-science
symbai
Commits
3050a43c
Commit
3050a43c
authored
Apr 03, 2014
by
Dave Griffiths
Browse files
id selectors for spouse, mother, father
parent
fc8ee1e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
android/assets/starwisp.scm
android/assets/starwisp.scm
+15
-0
No files found.
android/assets/starwisp.scm
View file @
3050a43c
...
...
@@ -874,6 +874,21 @@
(
lambda
(
activity
)
'
())
(
lambda
(
activity
requestcode
resultcode
)
(
person-selector-return
requestcode
"id-spouse"
spouse-request-code
)
;; intercept a spouse setting and set the other individual
;; BIDIRECTIONAL AUTOSPOUSE
(
when
(
and
(
eqv?
requestcode
spouse-request-code
)
(
get-current
'choose-result
#f
))
(
update-entity
db
"sync"
(
entity-id-from-unique
db
table
(
get-current
'choose-result
#f
))
(
list
(
ktv
"id-spouse"
"varchar"
(
entity-get-value
"unique_id"
))))
(
msg
"done..."
))
;; save and reinit otherwise we can get out of sync here with the spouse :/
(
let
((
unique-id
(
entity-get-value
"unique_id"
)))
(
entity-update-values!
)
;; need to reset the individual from the db now (as update reset it)
(
entity-init!
db
"sync"
"individual"
(
get-entity-by-unique
db
"sync"
unique-id
)))
'
()))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment