SharePoint Canvas app - load screen based on content type - sharepoint

Situation: SharePoint list with two content types (CTs) - most fields are common, few are unique/exclusive to specific CTs. Plan is to utilize Power Apps canvas app that overwrites default new-edit-view forms for SharePoint items. Already created new Power App "app" with integration, app and screen components - also new screen for other content type.
Goal: when item form is prompted, open screen "assigned" to specific content type. In other words, if I want to open edit form for item with CT "A" load one screen, but if for item with CT "B" - load other. I am looking for solution that would detect CT and pick screen (form?).
Problem: how to achieve goal? Is it possible to have on-the-fly evaluation that decides which screen to load? Have tried different methods, no luck so far. Most articles describe how form contains control that user can use to make a switch - not the case here, since evaluation should be done before any form is loaded. I have tried introducing "temporary loader" form, but could not achive auto-redirect to desired screen/form.

Related

Unable to find the WPF custom control using coded ui

I am trying to automate WPF application (WPF with 3rd party devexpress) using coded UI (VS 2012) in my local machine (Windows server 2008 R2).
I am facing issues while identifying controls under dynamically generated content of the window. I've Tried different hierarchical levels to hit the control,But i am
still not able to hit the control.
Till some level I am getting the handle, but after I am not getting the handle.
My application is complex hierarchically structured with combining winforms and WPF.
I've Tried to use coded UI record and play feature to generate the UI Map and used the same structure to identify the controls. It worked while debugging line by line but it's failing while running.
e.g. Below is one hierarchy,
List item
Dashboard
Dash_Grid
LayoutManager
LayoutGroup
LayoutPanel -->Till this level I am able to get the handle and lower I am not able to hit the control
Container
Navtop
Nav_Grid
TileLayoutControl
........(all tiles)
This issue is not only with one page. I am having the same problem with all the pages.So this is blocking our automation.
Please can any one help me on this?
Try this two possible solutions:
Use the devexpress extension for codedui to identify and locate dexExpress controls:
https://www.devexpress.com/products/net/controls/winforms/coded-ui/
Dont replicate the elaborate hierarchy of your app when identifying controls but instead select the main controls in the hierarchy and use them to set your search properties. this is especially important for dynamically created content where the hierarchy is constantly changing.
in your example:
var List_item = new WpfListItem(parent);
List_item.SearchProperties.. = some search properties
and than set your control's parent to that top list item and ignore the midlle men:
var Container = new UITestControl(List_item);
where UITestControl should be replaced with the controls actuall type.

Replacing sitecore layout in parent and child items

I am creating a new footer sublayout in sitecore for use in multiple sites (we run a multi site environment). Currently a sublayout called StandardLayout is used, but I would like to change this across several of our sites to a new layout GlobalFooter.
The problem is that child items of the Home Page have overridden layout components, so what I would like to know is if there is an easy way to change the layout without losing all of the overridden components (as I expect that I may need to reset the layout in order for the flow down to occur)?
I am hoping to be able to just change the top level element (Home) and then have this flow down to the child elements, otherwise this task will become very long and tedious if I need to go through each item and change the presentation to use the new footer.
The icon circled in red in the image above indicates that the presentation has been overridden for that particular sitecore item.
To answer your question, directly, there is no way to apply an update of the presentation details of a template to templates that inherit from it that have had their presentation details changed without losing the changes.
The solution described in the blog post you linked to is the best solution for updating inherited presentation details in this manner. IMHO, I believe that this functionality should have been built into Sitecore long ago as a separate button on the ribbon, and you may choose to add one if you are so inclined. If you do not have the time to do so however, creating an admin page that you later delete from the site after using is a perfectly viable solution as well.
This post appears to detail a way that I can achieve my goal, basically I would create a admin page that does not publish and put the code in the blog into it to update the layout via a button trigger.
https://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2011/09/Programmatically-Update-Layout-Details-with-the-Sitecore-ASPNET-CMS.aspx

Mixing Orchard CMS content with module

I am currently working on an Orchard module. This module contains an MVC application including the views. I would like to make the module as configurable as possible. One of the items that I would like the customer to configure is the way the MVC views from the module look. Part of it will be determined by the theme. But not everything. Consider the following scenario:
The module contains a view for placing an order. The view displays a form in ´normal view way´. That is field labels and input labels. But at the head of the form each customer must be able to define his own set of instructions to display. Or maybe the customer wants to put there a message for pointing the customer to some other actions.
In the most ideal way I would have a content page where the customer can put all kind of content and one specific block that is the result of the view of the module. Kind like a web part. I can´t find out if it is possible and how that is achieved.
Edit for clarification
Module creates a page like this:
TITLE
FORM
So both title and form are outputted by the module controller.
I have managed to create a layer with the condition that the url matches the page with my form.
I have added a HTML widget to this layer in the content zone with position 1 (tried 0 to).
However the pages looks like this:
TITLE
FORM
WIDGET
instead of
WIDGET
TITLE
FORM
Returning a ShapeResult from your controller action will ensure that your view is themed and benefits from widgets, which are your "kind like a web part" thingies in Orchard.

Using an Outline with XPages Extension Library Mobile Controls

I am using the XPages Extension Library mobile controls to create a mobile web interface for an existing Notes app.
When displaying a document with a large number of fields I would like to use an accordion type UI so that parts of the page can be expanded or collapsed to show or hide the fields in each pane (similar to sections in a traditional Notes client app).
Having looked at the "Accordion Outline" in the Ext Lib demo app I started to build the page using the Outline control. Within each entry (node) of the Outline I, ideally, want to place a rounded list and then put my fields & controls inside that.
But it looks like the nodes in the Outline can't contain this type of content - unless I'm missing something?
Any suggestions as to which controls I can use this type of UI?
Thanks
You can any time use an xp:panel and assign it the dijit.accordeon (look up the exact name please) dojo type. Then you can put anything inside including repeat controls etc. I would guess it might make sense to build your own CC to hold the content for each accordeon panel

Default content editor in list form doesn't allow image alignment

I need to be able to adjust the alignment of an image in an "Enhanced Rich Text Field" in an announcements list in MOSS 2007. However, the default content editor in the edit form for the list doesn't provide a way to do that. What's the fastest way for me to make sure users can align images? My first thought was to customize the DispForm.aspx and EditForm.aspx pages, but they just have the ListForm web part in the content region and as far as I know, you can't customize the ListForm web part from the designer.
You can't customize the LisForm web part, but you can add a "custom list form" to create a custom edit form. Maybe you haven't seen this article: http://weblogs.asp.net/jan/archive/2006/11/06/Custom-Edit-Forms-for-SharePoint-2007-Lists.aspx
Then you could do some javascript hackery to insert your own button which then calls something similar to existing RTE_InsertImage function to call a pop-up window and do whatever you need (you'll find this function in 12\template\layouts\1033\form.js)
I fail to see (or understand) your issue. I created a new announcements list, created a new item, inserted an image, aligned it to the right, viewed the item and it worked.
Then I proceeded to create a new custom column, choose multiple lines,enhanced rich text field, edited my list item, added an image, centered it, viewed and it was also working.
The only thing I noticed is that the "rich" control does not appears on non-IE browsers.

Resources