PowerApps Template - How to edit collections? - sharepoint

Hello Stack Community!
I'm currently in the process of adopting the Leave Request template for use in my organization. However, I've run into a few problems. I'm attempting to edit the already established collections in the app and am having a lot of trouble doing so. I've read the Patch article and I just can't figure out how to successfully use the Patch function to update the various collections I will need.
Some methods I've tried include editing the OnStart action in the Login Screen and this didn't work. I figured out how to edit the Company Holidays Collection via Excel on OneDrive. Essentially, I just need to edit one collection, the LeaveTypeCollection. I want to edit the options as well as the image (icon) available.
Can someone please give me a step-by-step guide on how to do so? I would be extremely grateful.

To update the LeaveTypeCollection, you can click on the Login Screen and then select the OnStart property in the formula dropdown and then expand the formula bar. You should be able to edit the values that you want to change or add a new leave type to the collection. You can then save and reopen the app and you should see the new leave types show up in the preview of an app.

Related

Create two edit button with different settings

I've created a version tracking that will show all the edited document inside view. What if I want to make all document be draft at the same time, and during that, document can't be edit. And after I click save, all draft document will be saved at the same time.
Edit 1
I have one more question when I do version tracking, how can I make all response document cannot be edit? only current document can be edit?
UPDATE QUESTION
Currently, I am using version tracking to show all list with all edit document. So for now, every time I click EDIT, it will show all history of updated.
So I want create a situation where I have 2 edit option which is EDIT and PC Specification. I want to set PC Specification after edit document, it updated all history under version tracking, but for EDIT I don't want it update under version tracking. Because, for EDIT function, it only for edit one or two information BUT for PC Specification, it is to update all information. For example, I have 3 documents inside the "Computer" view.
When I open one document, it will show document details. On top menu, I have two buttons which are Edit and Close Windows. So can I add one more toolbar? Which is PC Spec as below?
So I will click the PC Spec button on the toolbar then the documents will open as a new document with same document information. Same as edit function. After I click save, it overwrite document + show edit history
For another situation where I click EDIT, same as PC Spec but after I click save, it overwrite document only.
As shown below, the history is when document edit using PC Spec only.
Another question, I have "Archived" view. How can I show only history of document inside "Archived" view?
Hope you guys can understand this. Please ask me anything if you not understand. Any help will be appreciated. Thanks! :)
Regarding your second question, to make all response documents non-editable, you will have to
Give your regular users Author access instead of Editor access in the database's Access Control List and assign them a role, which I'll call "AppUsers".
Give yourself and anyone else who will be responsible for managing the app a role which I'll call "AppAdmins".
Add a hidden computed field with type "Authors" to the form and set the initial value formula to
#If(#IsResponseDoc;"[AppAdmins]";"[AppUsers]":"[AppAdmins]")
Note that this will not have any effect on existing documents until you refresh and re-save them.
Then, you're going to have to hope that automatic versioning refreshes the documents. I'm not sure if it does or does not. If it does not, then you're probably going to have to give up on using the native versioning and write your own version using LotusScript. As I recall, that's what was done in the standard Lotus document library template, because the native versioning is pretty limited in what it can do.
As for your first question, I'm sorry but I really don't understand what you're asking. I can't tell in some parts whether you are telling us what you have already done, or what you want to do. Here on StackOverflow, the best way to get useful answers is to show us very clearly what you have tried, tell us what happens, and tell us what you thought should have happened instead. This is a place for helping you fix your code, not a place to get tutorials that amount to explicit instructions on how to write your code in the first place.

Add a comments section to post/pages on apostrophe cms

I need to build a comments section on my apostrophe for users to be able and leave comments/feedback around content that someone will create in pages. That would require to create collections in the database as well as allow users to comment only but not to remove any the module/widget. Also, comments need to, of course, be linked to pages.
Not really sure, how I can approach this task. Whether, to build a separate microservice or a widget to handle this. I have read the tutorial for building a contact form in apostrophe, also tested. However, I don't really need to have an option on the Admin Bar as comments are linked to each page, I need the form to be static (don't want any users to remove them or add more than one on a single page), also want the comments to appear below the form once they have been submitted.
Any idea of how I can do this?
Thank you for your time.
Dcram
EDIT
Well, before I needed to do this for pages and I even managed to post the comments specific for each page where it should be. However, needed to make a few changes on my site and now this comment widget appears in pieces like blogposts! However, haven't being able to display the specific comments for each piece. Is there any way I can find the piece page url similar to data.page._url so that I can compare with the one attached to each comment?
Thanks!
We almost always use Disqus for this purpose, but if you need a commenting functionality that is internal to your site, there is the apostrophe-pieces-submit-widgets module that can be extended for this purpose.
You would definitely want the comments to be an instance of an apostrophe-piece in the docs collection, which would mean it would by default be included as an item in the admin bar. Easy enough to hide that, however.
Following this pattern would result in creating / configuring 3 project-level modules:
comments - extends apostrophe-pieces, defines the comment piece type
comments-widgets - extends apostrophe-pieces-widgets, a widget to display comments on a template (you could also hard code this behavior into a template instead of making it a widget)
comments-submit-widgets - extends apostrophe-pieces-submit-widgets, a widget to display the front-end form that users use to submit their comments
Building this sort of functionality directly into a piece and its widget player is not too difficult, check out this project for more
https://github.com/stuartromanek/apostrophe-comment-system
Steps:
Checkout project / install / create user / get up and running
Create a Comment piece from the admin bad (Home Page Comments, for example)
Add the new piece to singleton widget on the homepage
Comment!
This code should give you a pretty clear guide for creating backend functionality that can be interacted with on the frontend.
Permissions for interacting with the widget itself should be managed through apostrophe-permissions http://apostrophecms.org/docs/tutorials/intermediate/permissions.html

Event workflow in SharePoint

Clearly I need to edit my question.
If I'd like to create a process, a process for registering and handlig some kind of event inside an organisation, where you first register this event, by giving it a title, and some other properties (date, description etc), then this event should be handled in some ways, this will be done in several steps in order to resolve this event. What would be the best way to do this? I'm not looking for an answer in code, just a keyword for what this could be called, or a guide/tutorial, or a link to something similar.
All help is appriciated, if u don't understand my question please tell me, and I will try to elaborate.
Since you tagged this SharePoint, I assume you have a SharePoint site set up already. On that site, you want to create a list (either a calendar list or a custom list; try both and see which option has more columns you'll use, then add/remove columns until you're capturing all the data you need). Then you want to create a workflow (or workflows) that run on items created in that list. Workflows created in SharePoint Designer can do everything you're asking, from sending automatic emails to changing fields in your items. Googling "SharePoint workflows" will start you down the road to developing your solution.

How do I accomplish this on JSF?

So I'm trying to find the best approach to solve the following problem.
I have the following pages:
1.insert.xhtml(Where I have a form to register a client)
2.find.xhtml(Where I have a table for the registered clients, where I can edit and exclude them)
In the find.xhtml page I have a context menu with the edit option, if I click on it, it'll open a <p:dialog> with the same insert.xhtml registration form, except for the submit button that have a different name and action-listener.
I also have other registrations that needs a client reference on it, ex.: registering a car sell to a registered client. The way I select an already registered client to add it to the sell form is by calling a popup with the same code in the find.xhtml table and select a client there, except this table have a button on its footer called select.
So what I'm asking is a way to reuse those forms/table codes being able to add a few components on them as needed. Is there a way to do it?
EDIT: Just like a template
EDIT2: Nevermind, I just solved it by using <ui:decorate>.
I am not sure if <ui:decorate> is the best solution. I have seen many examples of templating where it is used a composition. I like a lot this tutorial from IBM:
http://www.ibm.com/developerworks/java/library/j-jsf2fu2/index.html
they explain in detail how to create a template.

Change template html in sharepoint discussion reply box

I have a wss 3.0 install which needs an "anonymous" discussion board. I can modify the view so no usernames are displayed, however when I click on "reply", the message I'm replying to shows up in the rich text box with the username of the previous poster.
Is there a way to remove that username? or Remove the previous posted text altogether? I've found the schema.xml file with lots of relevant info under the ..12\TEMPLATE\FEATURES\DiscussionsList\Discuss folder, but not sure if this is the easiest way to adjust this setting.
Any comments appreciated.
Best practice says that you should always create a custom list definition instead of trying to modify the OOB assets.
The easiest way to do this is take a copy of the 12\TEMPLATE\FEATURES\DiscussionsList\Discuss folder, modify the feature Ids and names so that its unique. Then your free to change the schema render template (i.e view schema) and modify the edit and display forms.
If you need to modfify the actual entry form you may consider a custom control template : http://msdn.microsoft.com/en-us/library/aa543922.aspx
Custom list definition : http://msdn.microsoft.com/en-us/library/ms466023.aspx
Agrothe,
I have a similar requirement (hide or mask the author inside the reply thread.). What exactly inside of schema.xml do you think will allow you to do accomplish that?
Not sure if the list forms are exposed to xslt. If so, then perhaps this is another approach.
FWIW, the other solutions I have investigated:
(1) A custom event handler. Unfortunately, I can't pinpoint which event fires when someone click reply.
(2) Anonymous blog comments (http://blogs.msdn.com/sharepoint/archive/2007/08/06/anonymous-comment-feature-for-sharepoint-blog-now-available-on-codeplex.aspx).
(3) the other thing I am considering, is to introduce a global anonymous active directory login, which users can use to post anonymously. Not ideal, but for the amount of time I have spent researching a solution, might be my last hope.

Resources