Hi @Marcelo_De_Guzman , So your question is, you already know how many weeks the pregnancy is, and you want to get this info on task such that you know wheter to populate the task or not?
So, What I have struggle right now is getting the data from contact-summary.templated (or a calculation) to tasks.js as a appliesIf condition.
I might be missing something here, but your contact-summary.templated.js file and your tasks.js file should be able to share code. You can extract the logic into a sparate file and then require that file in contact-summary.templated.js and tasks.js. (Similar to how the tasks.js and targets.js files in the example Default config both depend on shared logic in the nools-extras.js file.
Alternatively, you mention “calculation”. If your algorithm is sufficiently complex, you could extract it to an extension-lib that could be referenced from forms/contact-summary/tasks/etc.
The pregnancy_home_visit.xlsx form demonstrates how is this field retrieved and used on the form. Look for line 42 and 53 to see how tt_received_ctx holds the value of tt_received_past exposed in contact summary and how that is used in forms in line 197.
There are multiple examples of passing these values and you can do the same for your task form.