Hi All,
I used a template app to collect project demand. template name is Service desk.
It used collections and I chanced it to sharepoint list. In this template everything work perfectly but save procet buttons is not working. Is there any idea why it isn't work.
here is my save project button code
If(CreatedBy.Text="" || Dropdown_Priority.SelectedText.Priority="Select a priority" ||Dropdown_Area.SelectedText.'Account Name'="Select an area" || Subject.Text="" || Description.Text="";
UpdateContext({msg_visible:false});;UpdateContext({msg_visible:true});
Collect(Projects;{ID:Value(Text(CountRows(Projects)+1));Owner:CreatedBy.Text;AccountName:Dropdown_Area.SelectedText.'Account Name';Priority:Dropdown_Priority.SelectedText.Priority;Subject:Subject.Text;Description:Description.Text;Status:"New";DateCreated:DateTimeValue(Text(Today()))});;
Navigate(DashboardPage; ScreenTransition.None))
Hi @SinanALMAC ,
I have parsed this for you to get a better look
If(
CreatedBy.Text="" ||
Dropdown_Priority.SelectedText.Priority="Select a priority" ||
Dropdown_Area.SelectedText.'Account Name'="Select an area" ||
Subject.Text="" ||
Description.Text=""; //end of "if" part
UpdateContext({msg_visible:false});; //"Then" part
UpdateContext({msg_visible:true}); //"Else" part ?
Collect(
Projects;
{
ID:Value(
Text(
CountRows(
Projects
)
+1
)
);
Owner:CreatedBy.Text;
AccountName:Dropdown_Area.SelectedText.'Account Name';
Priority:Dropdown_Priority.SelectedText.Priority;
Subject:Subject.Text;
Description:Description.Text;
Status:"New";
DateCreated:DateTimeValue(Text(Today())
)
}
);;
Navigate(DashboardPage; ScreenTransition.None))
I think this bit
UpdateContext({msg_visible:false});;
UpdateContext({msg_visible:true});
Should be
UpdateContext({msg_visible:false});
UpdateContext({msg_visible:true});;
Without looking fully into your logic, are not these two statements alternates and should be separated by an "else" operator and then continue on to the Collect function?
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @WarrenBelz
Thank you for your reply
I have tried your solution but it didn't work. But It works perfectly when I use it as the data as a collection instead of a Sharepoint list.
I think there is a difference between the SharePoint list and Collection When I use it to get the data with "collect" function. Do you know another function to use add the data to SharePoint?
Best regards
Sinan
Hi @SinanALMAC ,
Sorry for the delay - I missed your reply in my feed.
A collection is a temporary table containing the information you have "collected" from the data source.
You can "Patch" data from a collection to a SharePoint list - here is some documentation on it.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
196 | |
124 | |
87 | |
49 | |
42 |
User | Count |
---|---|
284 | |
163 | |
138 | |
75 | |
72 |