Description
During migration from SP List to Evolve Data reference, we lost our calculated columns.
How to create it? In Foundation solution, we had create some SP list with Winshuttle queries.
After the first extraction, we add with SP list settings a new calculate column to concatenate Key value & Description Value.
This column was used in Dropdown list to retrieve a key in function of key value or its description.
Applies To
Evolve 20.0, 20.1
Cause
Calculated column is not available in Evolve
Solution/Immediate Workaround
This can be easily replicated by including one extra step
Basic Steps:
- Retrieve data from Reference Data in repeating table
- Update reference data with concatenated value
- Retrieve that value in dropdown
Detail Steps:
1. Create a Reference Data
2. In the Solution, create a Data Connection using that Reference Data
3. In the Form, add two groups with one text box, one repeating table and two buttons each.
4. In the first group, name the text box as Data Log, repeating table as OutputData and the Buttons as Get Reference Data and Calculate Data
5. In the second group, name the text box as Data Log1, repeating table as InputData and the Buttons as Copy Data and Update Reference Data
6. Add two Webservice Element
7. On the Solution tab, right click on the created Data Connection and create Field Mapping
8. Give all the required name and select Get from the Operation Dropdown and click on Next
9. Again right click on the Data Connection and Create Field Mapping but this time in Operation Dropdown, select Save and click on Next
10. Associate the Webservice Elements with the GetData and SaveData webservices that we created through the field mapping in Data Connection and Get Reference Data and Update Reference Data Button respectively
11. On the Calculate Data Button, add a custom rule.
For 20.0
var repCount = fxcount('/my:myFields/my:Grp/my:Grp_Output/my:OutputData/my:Repeating_Content/my:Int');
for(var i = 0; i < repCount; i++)
{
$form.setValue('/my:myFields/my:Grp/my:Grp_Output/my:OutputData/my:Repeating_Content[' + i + ']/my:UserName',concat($form.getValue('/my:myFields/my:Grp/my:Grp_Output/my:OutputData/my:Repeating_Content[' + i + ']/my:Int'), '-username'));
}
For 20.1
var repCount = count('/my:myFields/my:Grp/my:Grp_Output/my:OutputData/my:Repeating_Content/my:Int');
for(var i = 0; i < repCount; i++)
{
$form.setValue('/my:myFields/my:Grp/my:Grp_Output/my:OutputData/my:Repeating_Content[' + i + ']/my:UserName',concat($form.getValue('/my:myFields/my:Grp/my:Grp_Output/my:OutputData/my:Repeating_Content[' + i + ']/my:Int'), '-username'));
}
12. On the Copy Data Button add Copy Table Data Action Rule. In Primary Source put the OutputData Repeating table and in Target put InputData Repeating table
13. Click on f(x) next to Mapping and add the fields that needs to be copied and click OK
Additional Information
Sample Solution
Comments
0 comments
Please sign in to leave a comment.