cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
spartanboy
Helper I
Helper I

PowerApps collection function results in [object Object]

My powwerApps screen contains:

  • Text input: 'Topic', 'Date'.
  • Dropdown input as: 'EmployeeID', 'EmployeeName' these values are from OneDrive, with Items property as `Distinct(employee_table,EmployeeID)` and `Distinct(employee_table,EmployeeName)`

Currently using a generic `Collect` function to collect these 4 fields into a table.

Button, OnSelect property as: Collect(List, {Topic: topic.Text, Date: date.Text, EmployeeID: employeeid, EmployeeName: employeename})

 

The Collection table results as: Topic and Date as 'Input value'. But, EmployeeID and EmployeeName shows as `[object Object]`

2 ACCEPTED SOLUTIONS

Accepted Solutions
gabibalaban
Dual Super User
Dual Super User

@spartanboy 

Collect(List, {Topic: topic.Text, Date: date.Text, EmployeeID: employeeid.Selected.Result, EmployeeName: employeename.Selected.Result})

View solution in original post

Value(hrs.Text) if you want to keep them as number, hrs.Text as text.

View solution in original post

9 REPLIES 9
gabibalaban
Dual Super User
Dual Super User

@spartanboy 

Collect(List, {Topic: topic.Text, Date: date.Text, EmployeeID: employeeid.Selected.Result, EmployeeName: employeename.Selected.Result})

spartanboy
Helper I
Helper I

@gabibalaban: I have 3 other 'Input text' as Number. how to show them in collection? 
WORKIN_HOURS: hrs.Value - give error

Value(hrs.Text) if you want to keep them as number, hrs.Text as text.

spartanboy
Helper I
Helper I

@gabibalaban :

While creating a JSON csv export, using:

Set(varFormattedJSON, JSON(List, JSONFormat.IndentFour));
ExporttoCSV.Run(varFormattedJSON)

 

get the below error: here 'hrs' is a input text with numbers..

JSON function cannot serialize tables/objects with nested property called 'hrs' of type control. 

@spartanboy ,

i think you used the control name without a property, in this case Text. Use hrs.Text.

spartanboy_1-1636352610618.png

 

 

in collect function as this?

spartanboy_0-1636352561261.png

gives an error

Try to change the column name or the control name . The system might be a little bit confused about the name.

spartanboy_0-1636353799167.png

in collect function - WORKIN_HOURS: hrs.Text,

 

gives an error in JSON CSV export as well as while collection.

But,  WORKIN_HOURS: hrs, works well with collection and not with JSON CSV export

 

collection list shows, for any columns that is date or a numerical text input. hence the JSON CSV error - how to fix this?

spartanboy_0-1636355488412.png

 

I use this solution. Putting Selected.Result instead of .Selected but formula got some error. Is the any settings needed for the Combo Box?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,727)