cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pinoq
Helper IV
Helper IV

Get column data via two version

I have create a portal that store the information of a new join staff, when the information of the staff have amend , I would like to send an email to the new staff and provide the data before and after modified.I used the get the two version method and have successfully get the information. But the problem is that, when the column name have space between word, it failed. I use the expression  body('Parse_JSON')?['d']?['results'][1]['column name'].columnname.PNG . I get the column name here. And the error message is: InvalidTemplate. Unable to process template language expressions in action 'Initialize_variable_Keyboard_or_Mouse_Before_Modified' inputs at line '1' and column '2724': 'The template language expression 'body('Parse_JSON')?['d']?['results'][1]['Keyboard_x0020_or_x0020_Mouse']' cannot be evaluated because property 'Keyboard_x0020_or_x0020_Mouse' doesn't exist, available properties are '__metadata, CreatedBy, Fields, FileVersion, Created, IsCurrentVersion, VersionId, VersionLabel, ContentTypeId, Title, OData__x005f_ModerationComments, File_x005f_x0020_x005f_Type, ComplianceAssetId, Person, Monitor, Laptop, PC, Special_x005f_x0020_x005f_Cable, Keyboard_x005f_x0020_x005f_or_x005f_x0020_x005f_Mouse, Other, OData__x005f_ModerationStatus, Region, Status, Location, Requestreturnequipment, ID, Modified, Author, Editor, OData__x005f_HasCopyDestinations, OData__x005f_CopySource, owshiddenversion, WorkflowVersion, OData__x005f_UIVersion, OData__x005f_UIVersionString, Attachments, InstanceID, Order, GUID, WorkflowInstanceID, FileRef, FileDirRef, Last_x005f_x0020_x005f_Modified, Created_x005f_x0020_x005f_Date, FSObjType, SortBehavior, FileLeafRef, UniqueId, SyncClientId, ProgId, ScopeId, MetaInfo, OData__x005f_Level, OData__x005f_IsCurrentVersion, ItemChildCount, FolderChildCount, Restricted, OriginatorId, NoExecute, ContentVersion, OData__x005f_ComplianceFlags, OData__x005f_ComplianceTag, OData__x005f_ComplianceTagWrittenTime, OData__x005f_ComplianceTagUserId, AccessPolicy, OData__x005f_VirusStatus, OData__x005f_VirusVendorID, OData__x005f_VirusInfo, AppAuthor, AppEditor, SMTotalSize, SMLastModifiedDate, SMTotalFileStreamSize, SMTotalFileCount'. Please see https://aka.ms/logicexpressions for usage details.'

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Pinoq,

 

Please have a try the following expression:

 

body('Parse_JSON')?['d']?['results'][1]['Keyboard_x005f_x0020_x005f_or_x005f_x0020_x005f_Mouse']

 

It is better to name the column name as KeyboardOrMouse, the first of letter change to upper and connect them, it will avoid many trobles.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
rsaikrishna
Dual Super User
Dual Super User

Hi @Pinoq

 

Can you share the snippets of the flow and execution results (screen shots) which shows the issue? 

 

Regards

 

Can you refer to below post for the flow? Because this post also have the information of the code of ('Parse_JSON').Might have more detail inside.

 

 https://powerusers.microsoft.com/t5/Building-Flows/Send-an-email-that-can-show-the-existing-item/m-p...

 

For the execution results , do you mean the error message?

 

Because it just show failed and show the below error message:

 

Below is the error message that show. 

variable.PNG

What I want to do is , I want to initialize two variable with 

1) body('Parse_JSON')?['d']?['results'][1]['PC'] (version before modified)

2)body('Parse_JSON')?['d']?['results'][0]['PC'](version after modified)

This can let me show the column information in one email to the new join staff.

 

As you see in above cap screen , it worked for the column "PC" , but not work with the column Keyboard_or_Mouse , and I found that when the column name have space between , it cannot work.

 

Error message:

 

 InvalidTemplate. Unable to process template language expressions in action 'Initialize_variable_Keyboard_or_Mouse_Before_Modified' inputs at line '1' and column '2724': 'The template language expression 'body('Parse_JSON')?['d']?['results'][1]['Keyboard_x0020_or_x0020_Mouse']' cannot be evaluated because property 'Keyboard_x0020_or_x0020_Mouse' doesn't exist, available properties are '__metadata, CreatedBy, Fields, FileVersion, Created, IsCurrentVersion, VersionId, VersionLabel, ContentTypeId, Title, OData__x005f_ModerationComments, File_x005f_x0020_x005f_Type, ComplianceAssetId, Person, Monitor, Laptop, PC, Special_x005f_x0020_x005f_Cable, Keyboard_x005f_x0020_x005f_or_x005f_x0020_x005f_Mouse, Other, OData__x005f_ModerationStatus, Region, Status, Location, Requestreturnequipment, ID, Modified, Author, Editor, OData__x005f_HasCopyDestinations, OData__x005f_CopySource, owshiddenversion, WorkflowVersion, OData__x005f_UIVersion, OData__x005f_UIVersionString, Attachments, InstanceID, Order, GUID, WorkflowInstanceID, FileRef, FileDirRef, Last_x005f_x0020_x005f_Modified, Created_x005f_x0020_x005f_Date, FSObjType, SortBehavior, FileLeafRef, UniqueId, SyncClientId, ProgId, ScopeId, MetaInfo, OData__x005f_Level, OData__x005f_IsCurrentVersion, ItemChildCount, FolderChildCount, Restricted, OriginatorId, NoExecute, ContentVersion, OData__x005f_ComplianceFlags, OData__x005f_ComplianceTag, OData__x005f_ComplianceTagWrittenTime, OData__x005f_ComplianceTagUserId, AccessPolicy, OData__x005f_VirusStatus, OData__x005f_VirusVendorID, OData__x005f_VirusInfo, AppAuthor, AppEditor, SMTotalSize, SMLastModifiedDate, SMTotalFileStreamSize, SMTotalFileCount'. Please see https://aka.ms/logicexpressions for usage details.'

@Pinoq 

 

Instead of using field internal name, did you try using with space?

Example: "Keyboard or Mouse" 

 

Can you share the results of your HTTP call? 

v-litu-msft
Community Support
Community Support

Hi @Pinoq,

 

Please have a try the following expression:

 

body('Parse_JSON')?['d']?['results'][1]['Keyboard_x005f_x0020_x005f_or_x005f_x0020_x005f_Mouse']

 

It is better to name the column name as KeyboardOrMouse, the first of letter change to upper and connect them, it will avoid many trobles.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (44,725)