Closed ritazagoni closed 3 years ago
See similar previous issue for other job for reference: https://github.com/OpenFn/lwala/issues/49
@ritazagoni to make sure we do this properly this time, can you please draft an Excel mapping table for these values? To do this....
Person__c
Then we can hand off to Mamadou a very specific mapping table spec to implement... as well as flag if it should be slightly different between forms/jobs. Thanks!!
@lakhassane confirming that form values are same as in the referred MOH513 Enroll Household job, see values here: https://docs.google.com/spreadsheets/d/1RacnVeCqNC21PZ1TLkmjcvdMgUtiPhLZ-cfxB6RZrUs/edit#gid=107763190
@ritazagoni I made the transformation https://www.openfn.org/projects/pdbmj5/runs/rwabd53x
Request
In this message on
line 33
we recieve the following value:"No_FPmethod_reason": "intentions_of_getting_pregnant"
. This should be transformed toIntentions of getting pregnant
but the erroneous result is'intentions of getting The client is pregnant'
.Transformation rules:
pregnant
-->The client is pregnant
intentions_of_getting_pregnant
-->Intentions of getting pregnant
lack_of_access_to_fp_information
>Lack of access to FP information
i think the problem lies in this piece of code where we replace the word
pregnant
but not checking for whole word. So we're picking uppregnant
fromintentions_of_getting_pregnant
.intentions_of_getting_pregnant
and`lack_of_access_to_fp_information
(see Transformation rules above) to the job (they were probably added later to CommCare hence the problem and missing cleaning).For Salesforce, if multiple values are selected... then should be separated by a semi-colon (e.g.,
Field__c: 'Value1; Value2'
)See issue and fix for the same problem in MOH513 Enroll Household job: https://github.com/OpenFn/lwala/issues/49
Expression
Job: https://github.com/OpenFn/lwala/blob/master/commcare-salesforce-jobs/MOH514-Update-Person-in-SF-Production.js
Failed run to test: https://www.openfn.org/projects/pdbmj5/runs/r893abg3
Message: https://www.openfn.org/projects/pdbmj5/messages/mqpj6kk9
State:
See LP for
Lwala Salesforce Production
Adaptor
language-salesforce