What is wrong with this expression that I get subject error?
ClearCollect(
fillVsVacant,
{
Category: "Filled",
Count: Sum(
Projects,
'Billable Positions'
)
},
{
Category: "Vacant",
Count: Sum(
Projects,
'Vacant Positions'
)
}
)
v/r,
Bill
Solved! Go to Solution.
@RandyHayesnot sure why, but when I moved the code to the app OnStart() it worked. Bug or Feature?
What kind of columns are the Billable and Vacant positions defined as? And what is your data source?
If they turn out to be text instead of numeric, you could consider using the following:
ClearCollect( fillVsVacant, { Category: "Filled", Count: Sum(Projects, Value('Billable Positions')) }, { Category: "Vacant", Count: Sum(Projects, Value('Vacant Positions')) } )
I hope this is helpful for you.
I've Googled this message and came up with ZIP!
Both fields are numbers in a list (not a document library):
Title | Single line of text |
Prime Manager | Lookup |
Alt Manager | Lookup |
Billable Positions | Number |
Vacant Positions | Number |
Job Postings | Number |
Modified | Date and Time |
Created | Date and Time |
Created By | Person or Group |
Modified By | Person or Group |
All looks good!
So, I would next start to suspect the environment...here's what I'd do next:
1) Save and close the app designer. Then go back in to edit. Many strange things are cleared up by this.
2) Remove the Projects datasource from your app...then add it back in.
3) Create a fresh app and add the Projects data source and a button with this exact syntax in the OnSelect.
Hopefully #1 will help and the others not needed, but if not, then walk down the list.
@RandyHayesnot sure why, but when I moved the code to the app OnStart() it worked. Bug or Feature?
User | Count |
---|---|
142 | |
137 | |
78 | |
73 | |
70 |
User | Count |
---|---|
226 | |
137 | |
78 | |
61 | |
56 |