Hi,
I have a text field in the form which user can enter any number of characters, I am storing details of this form in common data service. As the text column in cds will accept max to 4000, my flow is got failed when character length is more than 4000.
I tried to add an expression mentioned below to extract first 4000 characters when i am inserting record. However am getting below error.
I tried below substring functions in expression
substring(triggerBody()?['Reason/Business justification'],1,4000)
error : One or more fields provided is of type 'Null', a different type is expected.
substring(outputs('Get_response_details')?['body/rd07b3c96a0264658bbc3ace8b3711eb9'],1,4000)
error : Unable to process template language expressions in action 'Create_a_new_record' inputs at line '1' and column '90440': 'The template language function 'substring' parameters are out of range: 'start index' and 'length' must be non-negative integers and their sum must be no larger than the length of the string
Can someone please help/suggest me how i can get first 4000 characters when i am inserting data to cds
Thank you!
Hi @SaiRupa
Here is your expression. Note: Index starts from 0.
if(greater(length(outputs('Get_response_details')?['body/rd07b3c96a0264658bbc3ace8b3711eb9']) ,4000),substring(outputs('Get_response_details')?['body/rd07b3c96a0264658bbc3ace8b3711eb9'],0,4000),outputs('Get_response_details')?['body/rd07b3c96a0264658bbc3ace8b3711eb9'])
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
35 | |
16 | |
14 | |
8 | |
8 |
User | Count |
---|---|
33 | |
24 | |
16 | |
7 | |
6 |