
Announcements
I'm not sure what exactly caused this to happen, but I come back from the weekend and now when I click a button to view more details on a project on a separate screen, everything goes blank. And then if I navigate or click into other screens, they are also blank. I am not sure why this would be happening, but it is a huge issue obviously. It only happens once you click this specific button, but what's odd is that things on the next screen that should always be visible aren't even showing up....
Here is my code for the problem button:
Clear(col_answers);
ForAll(
Filter(
Answers,
'Project ID' = ThisItem.'Request ID'
),
Collect(
col_answers,
{
Answer: ThisRecord.Answer,
'Question ID': ThisRecord.'Question ID',
AnswerID: ThisRecord.ID,
//grab the sort order, so if any dependent questions get patched/added later on, when recollecting the col_question table, it sorts it properly
Question_Sort_Order: LookUp(
'Question List',
'Question ID' = ID
).'Sort Order'
}
)
);
ClearCollect(
col_review_approve_details,
{
ProjectID: ThisItem.'Request ID',
Project_Name: ThisItem.Title,
Project_Description: ThisItem.'Project Description',
Project_Type: ThisItem.'Project Type'.Value,
E_P_O: ThisItem.'External Person/Organization'.Value,
Department: ThisItem.'Function/Department'.Value,
Submitter: ThisItem.Submitter.DisplayName,
Submission_Date: ThisItem.'Date of Submission',
Status: ThisItem.Status.Value,
Submitted_on_behalf_of:ThisItem.'Submitted on behalf of'.DisplayName,
Product_Line: ThisItem.'Product Line'.Value,
Submitter_Comments: ThisItem.'Submitter Comments',
Reviewer_comments: ThisItem.'Reviewer Comments',
Approver_Comments: ThisItem.'Approver Comments',
Date_of_Approval: ThisItem.'Date of Approval',
Attachments:ThisItem.Attachments,
Reviewer:ThisItem.Reviewer.DisplayName,
Region: ThisItem.Region.Value,
Market: ThisItem.Market.Value,
Number_Of_Attachments:CountRows(ThisItem.Attachments.DisplayName)
}
);
Clear(col_questions);
ForAll(
SortByColumns(Filter(
col_answers,!IsBlank(Answer)),
"Question_Sort_Order"
),
Collect(
col_questions,
{
Question_Text: LookUp(
'Question List',
'Question ID' = ID
).'Question Text',
Amount: LookUp(
'Question List',
'Question ID' = ID
).Amount,
Currency: LookUp(
'Question List',
'Question ID' = ID
).'Currency?',
Question_Type: LookUp(
'Question List',
'Question ID' = ID
).'Question Type',
Dependent: LookUp(
'Question List',
'Question ID' = ID
).'Dependent?',
Parent_Dependent: LookUp(
'Question List',
'Question ID' = ID
).'Parent Dependent',
Child_Dependent: LookUp(
'Question List',
'Question ID' = ID
).'Child Dependent',
Question_Count: CountRows(col_questions) + 1,
AnswerID: AnswerID,
Question_Sort_Order: LookUp(
'Question List',
'Question ID' = ID
).'Sort Order',
Answer: Answer,
QuestionID: 'Question ID',
Required: LookUp(
'Question List',
'Question ID' = ID
).Required
}
)
);
Set(var_ProjID, ThisItem.'Request ID');
Set(var_currency,LookUp(
Country_To_Region,
Title = ThisItem.Market.Value
).Currency);
Navigate(
Reviewer_Approver_View,
Fade
);
And this is what I mean by blank screen. And once one goes blank they all do, I must refresh the whole application for it to come back -
Update: 1:49pm
The root cause of this issue is tied to this collection on the onselect property of the button in the gallery. Specifically, the attachments column in this collection is causing the issue. When collected, the attachments table in the first row of said collection usually allows me to click into the table to view each individual attachment row, but my bug is causing nothing to happen when I try to click into the attachments column table.
Image of trying to click into the attachments table
Collection Code tied to the bug:
ClearCollect(
col_review_approve_details,
{
ProjectID: ThisItem.'Request ID',
Project_Name: ThisItem.Title,
Project_Description: ThisItem.'Project Description',
Project_Type: ThisItem.'Project Type'.Value,
E_P_O: ThisItem.'External Person/Organization'.Value,
Department: ThisItem.'Function/Department'.Value,
Submitter: ThisItem.Submitter.DisplayName,
Submission_Date: ThisItem.'Date of Submission',
Status: ThisItem.Status.Value,
Submitted_on_behalf_of:ThisItem.'Submitted on behalf of'.DisplayName,
Product_Line: ThisItem.'Product Line'.Value,
Submitter_Comments: ThisItem.'Submitter Comments',
Reviewer_comments: ThisItem.'Reviewer Comments',
Approver_Comments: ThisItem.'Approver Comments',
Date_of_Approval: ThisItem.'Date of Approval',
Attachments:ThisItem.Attachments,
Reviewer:ThisItem.Reviewer.DisplayName,
Region: ThisItem.Region.Value,
Market: ThisItem.Market.Value,
Number_Of_Attachments:CountRows(ThisItem.Attachments.DisplayName)
}
);
I did test to see if I removed all my filters from the gallery if I would have anything different and to my surprise, when I removed all filters from my gallery and then clicked into the record to populate the collection, the attachments showed up just fine and I could click in and view each attachment record in the collection. But I don't see a problem with my gallery code filters, as far as I can tell the filtering is working as intended and I don't understand why it would have such a big impact on pulling attachments.
Here is the code for my gallery (does not work):
Switch(var_All_statuses,
true,
SortByColumns(
AddColumns(
Filter(Transactions,
Search_Requests_2.Text in Title ||
Search_Requests_2.Text in 'Request ID' ||
Search_Requests_2.Text in 'External Person/Organization'.Value ||
Search_Requests_2.Text in Submitter.DisplayName,
IsBlank(Market_CB.SelectedItems.Title) || IsEmpty(Market_CB.SelectedItems.Title) || Market.Value in Market_CB.SelectedItems.Title,
IsBlank(Department_CB.SelectedItems.Value) || IsEmpty(Department_CB.SelectedItems.Value) || 'Function/Department'.Value in Department_CB.SelectedItems.Value,
IsBlank(Prod_Line_CB.SelectedItems.Value) || IsEmpty(Prod_Line_CB.SelectedItems.Value) || 'Product Line'.Value in Prod_Line_CB.SelectedItems.Value
),
"Submitter Name", Submitter.DisplayName,
"EPO", 'External Person/Organization'.Value,
"Market Name", Market.Value,
"Department", 'Function/Department'.Value,
"Product_Line", 'Product Line'.Value,
"Submission Date",'Date of Submission',
"Project Status", Status.Value
),
varSort,
If(varOrder, Descending, Ascending)
),
false,
SortByColumns(
AddColumns(
Filter(Transactions,
Status.Value in ["Pending With Approver","Pending With Reviewer","Pending With Submitter"],
Search_Requests_2.Text in Title ||
Search_Requests_2.Text in 'Request ID' ||
Search_Requests_2.Text in 'External Person/Organization'.Value ||
Search_Requests_2.Text in Submitter.DisplayName,
IsBlank(Market_CB.SelectedItems.Title) || IsEmpty(Market_CB.SelectedItems.Title) || Market.Value in Market_CB.SelectedItems.Title,
IsBlank(Department_CB.SelectedItems.Value) || IsEmpty(Department_CB.SelectedItems.Value) || 'Function/Department'.Value in Department_CB.SelectedItems.Value,
IsBlank(Prod_Line_CB.SelectedItems.Value) || IsEmpty(Prod_Line_CB.SelectedItems.Value) || 'Product Line'.Value in Prod_Line_CB.SelectedItems.Value
),
"Submitter Name", Submitter.DisplayName,
"EPO", 'External Person/Organization'.Value,
"Market Name", Market.Value,
"Department", 'Function/Department'.Value,
"Product_Line", 'Product Line'.Value,
"Submission Date",'Date of Submission',
"Project Status", Status.Value
),
varSort,
If(varOrder, Descending, Ascending)
))
Update: 4:26pm
Really strange, I think this may be a bug with the latest version of PowerApps??
If I change the gallery's items property to just the true value code of the above snippet per my last update, then it works; the attachments table allows me to click into it when viewing the first record of the collection. But the second I add the switch statement back in, I get the bug even if the switch statement's value is true and it is using the same code. Just to be clear, as long as there is no switch or if/else statement with the galleries items property everything works. And I can use either my true or false value snippet of code, does not matter.
SortByColumns(
AddColumns(
Filter(Transactions,
Search_Requests_2.Text in Title ||
Search_Requests_2.Text in 'Request ID' ||
Search_Requests_2.Text in 'External Person/Organization'.Value ||
Search_Requests_2.Text in Submitter.DisplayName,
IsBlank(Market_CB.SelectedItems.Title) || IsEmpty(Market_CB.SelectedItems.Title) || Market.Value in Market_CB.SelectedItems.Title,
IsBlank(Department_CB.SelectedItems.Value) || IsEmpty(Department_CB.SelectedItems.Value) || 'Function/Department'.Value in Department_CB.SelectedItems.Value,
IsBlank(Prod_Line_CB.SelectedItems.Value) || IsEmpty(Prod_Line_CB.SelectedItems.Value) || 'Product Line'.Value in Prod_Line_CB.SelectedItems.Value
),
"Submitter Name", Submitter.DisplayName,
"EPO", 'External Person/Organization'.Value,
"Market Name", Market.Value,
"Department", 'Function/Department'.Value,
"Product_Line", 'Product Line'.Value,
"Submission Date",'Date of Submission',
"Project Status", Status.Value
),
varSort,
If(varOrder, Descending, Ascending)
)
Hello! maybe we are having the same issue. Any attachments field reference is returning blank. It used to work, but in the last 2 weeks it stopped working. check the post https://powerusers.microsoft.com/t5/Building-Power-Apps/PowerApps-attachments-reference-no-longer-wo...