cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3R-Automation
Helper I
Helper I

JSON property now selectable in next action

I have a JSON action which has been converting a JSON field in a list to fields to insert into a new list.  I had to add a new Property as management wants it included.  But when I test out the flow the new property is not visible in the Create Items action after the JSON action completes. 

 

I do not know how to get the new Property to show up so that I can select it:

Create items.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

I tried the Compose action and after assigning the Body data from JSON I did not see the Billable property. 

 

Because the JSON records also include a null record, I built a condition check yesterday to look into the Project field data for the existence of Null values and not include pass them to the Create Items action.  This seems to be working but then I found that inside the Create Items action I needed to define the variables so that they would contain data from the array created from the JSON action.  I tentatively have the Billable variable populating when I assign the array value (and it seems to not cause errors). When I ran some tests on the newly created condition action the Billable value populated. 

I hope I have the conditional statement set up correctly, when I tested it, it appears to post the data correctly.  I guess time will tell.

JSON Evaluation.jpg

 

View solution in original post

8 REPLIES 8
Pstork1
Dual Super User III
Dual Super User III

Did you regenerate the JSON schema or add the new field to the Parse JSON schema?  That's how it knows what fields are available.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I added the field to the JSON schema but the field still does not show up to be selected.

Could you show a screenshot of a recent run showing the output of the parse schema?  That will tell you if the column is being returned or not.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-alzhan-msft
Community Support
Community Support

Hi @3R-Automation ,

 

Could you please share the output of the parse JSON action?

Please take a try to add a Compose action before the Create item action to see if the Billable dynamic content in available in the Compose action.

 

Best Regards,

Alice

 

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

My Schema from the JSON

{
  "type""array",
  "items": {
    "type""object",
    "properties": {
      "Project": {
        "type""string"
      },
      "Task": {
        "type""string"
      },
      "Day1": {
        "type": [
          "number",
          "null"
        ]
      },
      "Day2": {
        "type": [
          "number",
          "null"
        ]
      },
      "Day3": {
        "type": [
          "number",
          "null"
        ]
      },
      "Day4": {
        "type": [
          "number",
          "null"
        ]
      },
      "Day5": {
        "type": [
          "number",
          "null"
        ]
      },
      "Day6": {
        "type": [
          "number",
          "null"
        ]
      },
      "Day7": {
        "type": [
          "string",
          "number",
          "null"
        ]
      },
      "TotalHours": {
        "type": [
          "number",
          "null"
        ]
      },
      "Billable": {
        "type": [
          "boolean",
          "null"
        ]
      }
    }
  }
}
 
The output from the latest run(censored to not include company data):
[
  {
    "TaskWithProject""Cap > Statutory Holidays",
    "TotalHours"7.5,
    "Day1"7.5,
    "Project""Caps",
    "Task""Statutory Holidays"
  },
  {
    "TaskWithProject""Cap > Morning Meetings",
    "TotalHours"5.5,
    "Day2"1.5,
    "Day3"1.5,
    "Day4"1.5,
    "Day5"1,
    "Project""Cap",
    "Task""Morning Meetings"
  },
  {
    "TaskWithProject""IOC",
    "TotalHours"14.5,
    "Billable"true,
    "Day2"3,
    "Day3"6,
    "Day4"3.5,
    "Day5"2,
    "Project""IOC",
    "Task""Balling"
  },
  {
    "TaskWithProject""LEP > Fermentation Maintenance",
    "TotalHours"3,
    "Billable"true,
    "Day2"3,
    "Project""LEP",
    "Task""Maintenance"
  },
  {
    "TaskWithProject""Cap > Proposals",
    "TotalHours"6.5,
    "Day4"2.5,
    "Day5"4,
    "Project""Cap",
    "Task""Proposals"
  },
  {
    "TaskWithProject""Cap > Administration",
    "TotalHours"0.5,
    "Day5"0.5,
    "Project""Cap",
    "Task""Administration"
  },
  {
    "TaskWithProject"null,
    "TotalHours"null,
    "Project""",
    "Task"""
  }
]
 
The Built List workflow does create items and populates the list. But I still do not have the ability to select billable to assign it.
Even though the JSON runs successfully, the ability to select Billable is still not existent in the Dynamic Content list.
 

Billable is included in both your output and as a field in the schema.  But since its a boolean its being filtered out of the dynamic content dialogue.  You can use either True or False typed into the expression tab to generate the value you want filled out.  If you were doing a comparison it should show up in dynamic content.  But it won't in terms of update because unless you are changing the value there is no reason to show it in the list.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @3R-Automation ,

 

Please take a try to add a Compose action before the Create item action to see if the Billable dynamic content in available in the Compose action.

 

Best Regards,

Alice

 

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

I tried the Compose action and after assigning the Body data from JSON I did not see the Billable property. 

 

Because the JSON records also include a null record, I built a condition check yesterday to look into the Project field data for the existence of Null values and not include pass them to the Create Items action.  This seems to be working but then I found that inside the Create Items action I needed to define the variables so that they would contain data from the array created from the JSON action.  I tentatively have the Billable variable populating when I assign the array value (and it seems to not cause errors). When I ran some tests on the newly created condition action the Billable value populated. 

I hope I have the conditional statement set up correctly, when I tested it, it appears to post the data correctly.  I guess time will tell.

JSON Evaluation.jpg

 

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 (47,196)