PowerApps -If LookUp() is NULL with external data source - Power APPS BREAKS - excel

I have a PowerBi report with several data sources, SQL query and Excel connector.
The SQL data data on our Products whereas the Excel is living data on salesperson notes on said products.
The PowerBI has a PowerApp visualization. The Power App has 3 pages:
Page 1 is landing page that Gallery displays data from PowerBi
Page 2 is a form edit page to edit notes in the Excel spreadsheet that we know exists because we saw those notes in the PowerBi report
Page 3 is a form edit page to add new notes in the Excel spreadsheet that we know we have to add because we did not see them in the PBI report
On Page 1 are two buttons, "Edit" and "New" that navigates to the proper page.
Now here the WTF moment
IF the Product has notes and the user clicks on the NEW button, then PowerApps adds the line to the Excel spreadsheet, causing duplicates and thus the PowerBi report cannot refresh. It breaks.
If the Product does not have notes and the user clicks on the EDIT button then PowerApps does a LookUp(ExcelSpreadsheet, Column=Gallery1.Selected.PowerBiValue which results in a NULL value and thus breaks with a dreaded server response: expression "... eq null" is not supported.
If I try to add the 'IsEmpty()' to preemptive counter it, the 'Lookup()' is run first thus breaking before it gets to the 'IsEmpty()', same goes with 'IsBlank', 'IsBlankOrError', and 'IsError'.
I have Googled the living %(#$* out of this and there seems to be nothing on it, as this is in direct relation to 'LookUp' on the Excel Spreadsheet not a dropdown or in app text box that other people have issues with. How is it that you can't even use the error handler 'IsError()' as it breaks before the handler can even have a chance to do anything.
If I use LookUp(ExcelSpreadsheet, Column=Gallery1.Selected.PowerBiValue) in any way, shape, or form, with or without If clauses, because it will eventually produce a NULL result, Power Apps breaks
How do I read null values from a data source?

SOLUTION:
Since the "living data" Excel spreadsheet is also in the PowerBi report, I have PowerBi send the living data values along with the SQL queried product values to the PowerApp. Since the NULL is now a sent from PowerBi instead of queried from Excel within PowerApps, I can have 1 button that's OnSelect property reads:
IF(IsBlankorError(Gallery1.Selected.LivingDataNotes),Navigate(NewNotes),Navigate(EditNotes)

Related

Microsoft Word Macro Button to Save/Export Legacy Form Data to Excel Spreadsheet

First time poster here. This is my question:
STATUS. I built a word template for my company to automates the construction of our agreements. It has a legacy form on the first page that pulls clauses/verbiage into the rest of the document using conditional statements that reference the bookmarks in the form.
PROBLEM. I would like to create a submit button at the end of the form that, when pressed by the user, automatically exports the user’s responses to the form to one excel worksheet that houses all user responses to the form.
PRIOR ACTIONS. I cannot use an excel macro to search the folder where the word documents are saved because the users save each instance of the template agreement in different project folders. Additionally, it is impracticable for the form data to be sent to me via email.
Any help is greatly appreciated! If this question has been previously posted, please send me the link.

PerformancePoint analytic grid hyperlink functionality with KPI images

Within PerformancePoint I am trying to merge the functionality of an analytic grid with the imagery of a KPI scorecard. The analytic grid measures contain an action that lets the user jump to a specific edit page for that measure (based on the intersection of 2 dimensions, Line of Business and Month. That edit page is linked to a database, from which an SSIS package pulls information and processes to fill the cube. Is it possible to add a dynamic hyperlink property to the KPI, one that is based on the intersection of the 2 dimensions, or replace the measure value in the analytic grid with images (similar to a KPI indicator)? I was trying to do it using the API, but I haven't been able to see how to access those particular properties (the associated dimension member values).
Well, I had some screen shots that might have helped make things clearer, but don't have enough reputation to add images to a post, so Ill try and explain it in text.
I want to be able to use a hyperlink action expression such as the one below (which is functional in an analytic grid) on a scorecard KPI or baring that, use an image in place of the actual value in an analytic grid (to give it the appearance of a KPI).
/_layouts/GlobalDeliveryReporting/ProjectStatus.aspx?ProjectID=" + CSTR([Dim Project].[LOB].CurrentMember.PROPERTIES('Key1')) + "&Month=" + CSTR([Dim Status Month].[Months].CurrentMember.Member_Value))
In a nutshell:
I am trying to merge the functionality of the analytic grid action with the indicators of a scorecard Kpi.
I hope that made things a littler clearer.
Thank you
I was able to get this working.
With inspiration from :
http://web.archive.org/web/20080305164525/http://blogs.msdn.com/performancepoint/archive/2007/10/05/implementing-a-hyperlink-from-a-kpi-in-a-scorecard.aspx
For those that may need to do something similar, these were the key elements:
Scorecard
I added a hyperlink property, which causes a click event to fire every time you click on a cell.
Web Page Report
The url for the report points to redirect.aspx. It calls redirect.aspx with a query string parameter of EndPoint_URL which contains the dimension information of the clicked cell.
Redirect.aspx
This page is responsible for parsing values out of EndPoint_URL. Once the correct dimension level is achieved, it creates creates a new query string and redirects to the edit page, otherwise it just returns. The EndPointURL ends up looking like this:
[Level1].[Level2].[Level3].&[Level4].&[Level5].&[Level6].&[Microsoft].&[Level7].&[Level8]&[69621]; [Dim Status Month].[Months].[Status Year].&[2015].&[2015-02-01T00:00:00]
In this instance, the values that need to get passed to the edit page are [69621] and [2015-02-01T00:00:00]. The redirect page parses out the EndPoint_URL, if it reaches the correct depth and finds those values, it will send the user to the edit page, otherwise it will just return.
I put the scorecard and the web page report on a dashboard. Then connected them by passing the url and the memberuniquename of the row and column.
The downside is that it starts loading the redirect page everytime a user clicks on the scorecard, although that page is very lightweight, and once I hide the web page report web part clicking through the scorecard only causes a little blip on the screen.
Let me know if you have any questions!

Excel Pivot Table: Open URL with Pivot Table Settings as Parameter

I have an Excel file that connects to our customer database. In there, I can break down the number of customers using a Pivot table. For instance, I would see that there are X female customers of age 18-25 who live in the US.
What I'd like to do now, is take this number X, turn it into a link that, when clicked, opens a web browser window to a web application which is also connected to the same customer database and does something with this specific customer segment (i.e. builds a contact file for a newsletter application etc.)
I have no idea how this can be done. I assume that it may be possible to add a custom button to the Excel toolbar which would extract all the current pivot table settings so that I can send them as URL parameters to my web app. Is this possible? If so, how is it done?
Can you help me in the right direction please?
Thx a lot!
No need to create buttons if you dont have to.
You can use the HYPERLINK() function and concatenate the URL out of text and cell values.
So for example the URL for this page in an excel cell would be:
=HYPERLINK("https://stackoverflow.com/questions/"&A1&"/excel-pivot-table-open-url-with-pivot-table-settings-as-parameter")
Where cell A1 = 18843796
18843796 being the id for this question. You can do this with as many parameters as you want.
This will create a clickable URL which will automatically open your default browser.

Filtering a sharepoint list in infopath without Code

I am creating a browser enabled form and I would like to filter the results from a sharepoint list based on user input. if the user searches for the business unit "A" I would like a list of all locations that have a business unit of "A".
I have achieved this using code but the chaps that do the deployment want the from done without form code. can this be done and if so how?
I am using sharepoint 2007 and infopath 2007
my only real thought would be to create a web service that queries the SP list
I have looked to of solved the issue now.
I added a repeating section with controls on the form based on the data connection to the SP list. I then added conditional formatting on the repeating section to hide the control where business from data source does not equal search key word on the form.

Filling rows of a repeating table on opening the form

In my Infopath form I use a repeating table. On opening this form on sharepoint I would like to have some rows of the repeating table filled out using information from an other list. I use content types.
What i am working on is a Timesheet system where the user can register how many hours a week he worked on different projects.
I would like that by creation of a timesheet some predefined projects will be already inserted, meaning that the repeating table will have for example 5 rows already with 5 favourite or most used projects selected based on a separate PetProject list.
When I looked at the workflow in the list where the timesheet is being created I couldn’t find the column projectname in the dropdown so I cant give it a value. When I went to look in the Form settings of TimeSheets I saw that projectname cant be selected/edited, its in plain black whereas the other columns are blue and clickable. I thought its probably because the value of projectname is merged from the different rows in the repeating table.
Is there any way I can work around this problem and assign a value to projectname by creation of the timesheet?
Thank you so much!
I think that you will need to write some code to query the data that you are after and add the data to new rows in the repeating table.
There is a loading event that you can hook into to then query a secondary data source and then
add the row to the repeating table.
Will this run with in infopath as a thick client or will it run as a browser based form using infopath form service?

Resources