Hi friends,
In my app , I am facing a small problem as I want to insert 3 columns content in my google doc template as the template is based on "Checklist" table and those 3 columns are in the child table "ChecklistDetail".This latter is ref to Checklist table with "ChecklistID".
The columns I want to insert in my template are named:
Descrepancy 1, Descrepancy 2,Descrepancy 3
The 3 columns in some cases ,should not be all filled .as we can find only one or two filled .
Best regards,
Solved! Go to Solution.
You may need to do some testing for that error.
Please take the expression out of a table cell and check if it works.
Please try something like below outside the table cell.
<<START: SELECT( ChecklistDetail[DetailID],AND([ChecklistID] = [_THISROW].[ChecklistID],OR(ISNOTBLANK([Descrepancy 1]), ISNOTBLANK([Descrepancy 2]), ISNOTBLANK([Descrepancy 3]))))>>
<<IFS(ISNOTBLANK([Descrepancy 1]), CONCATENATE(" Descrepancy 1: ", [Descrepancy 1])) >>
<<IFS(ISNOTBLANK([Descrepancy 2]),CONCATENATE(" Descrepancy 2: ", [Descrepancy 2])) >>
<<IFS(ISNOTBLANK([Descrepancy 3]), CONCATENATE(" Descrepancy 3: ", [Descrepancy 3])) >>
<< END >>
You may want to mention where exactly you need help and if possible you may also want to share your current template.
Here is a screenshot of my template:
<<Start: SELECT( ChecklistDetail[DetailID], AND( [ChecklistID] = [_THISROW].[ChecklistID], OR( ISNOTBLANK([Descrepancy 1]), ISNOTBLANK([Descrepancy 2]), ISNOTBLANK([Descrepancy 3]) ) ) )>> | <<IF(ISNOTBLANK([Descrepancy 1]))>> Descrepancy 1: <<[Descrepancy 1]>> ENDIF <<IF(ISNOTBLANK([Descrepancy 2]))>> Descrepancy 2: <<[Descrepancy 2]>> ENDIF <<IF(ISNOTBLANK([Descrepancy 3]))>> Descrepancy 3: <<[Descrepancy 3]>> ENDIF <<End>> |
The header columns are from Checklist table while I want to get the three columns:
[Descrepancy 1] ,[Descrepancy 2] and [Descrepancy 3] from ChecklistDetail table as my ChecklistDetail is child Table to Checklist table.
How to write an expression to fetch those three columns if they are not blank.
Best regards,
You could try something like
<<Start: SELECT( ChecklistDetail[DetailID], AND( [ChecklistID] = [_THISROW].[ChecklistID], OR( ISNOTBLANK([Descrepancy 1]), ISNOTBLANK([Descrepancy 2]), ISNOTBLANK([Descrepancy 3]) ) ) )>> <<IFS(ISNOTBLANK([Descrepancy 1]), CONCATENATE(" Descrepancy 1: ", [Descrepancy 1])) >> <<IFS(ISNOTBLANK([Descrepancy 2]), CONCATENATE(" Descrepancy 2: ", [Descrepancy 2])) >> <<IFS(ISNOTBLANK([Descrepancy 3]), CONCATENATE(" Descrepancy 3: ", [Descrepancy 3])) >> << END >>
|
I used the above expressions but the pdf file is not created.When I went to the pdf creation bot monitor ,I found this error:
Error encountered in step with name [CreateSD_File]: Error: Task 'CreateSD_File' Body template. Found 1 unmatched 'End'. They are: <p class="c1"><span class="c2 c14"><< END >></span></p> Error: The document body is empty.
What could be the reason of this error?
You may need to do some testing for that error.
Please take the expression out of a table cell and check if it works.
Please try something like below outside the table cell.
<<START: SELECT( ChecklistDetail[DetailID],AND([ChecklistID] = [_THISROW].[ChecklistID],OR(ISNOTBLANK([Descrepancy 1]), ISNOTBLANK([Descrepancy 2]), ISNOTBLANK([Descrepancy 3]))))>>
<<IFS(ISNOTBLANK([Descrepancy 1]), CONCATENATE(" Descrepancy 1: ", [Descrepancy 1])) >>
<<IFS(ISNOTBLANK([Descrepancy 2]),CONCATENATE(" Descrepancy 2: ", [Descrepancy 2])) >>
<<IFS(ISNOTBLANK([Descrepancy 3]), CONCATENATE(" Descrepancy 3: ", [Descrepancy 3])) >>
<< END >>
It is working now without table.Thank you so much as usual you are my S.O.S
You are welcome.
Please note that when there is an error like unmatched << END >> etc., most likely it is an invisible formatting error in the template if the corresponding <<START: >> expression is also available.
You may want to mark the suggested approach as a solution so that it is useful for someone in future, searching for similar solution.
User | Count |
---|---|
15 | |
15 | |
8 | |
7 | |
4 |