cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Statement is very unstable. Works once, then shows unknown error.

Thew statement below is causing problems.  The underligned statement works perfectly when put in a label by itself.  Also note that there are two almost identical statements.  The second one never shows an error.  If I force the statement to "recmopile" itself by deleting a parenthesis, then type it in again, the statement will reconcile.  However, it will again error shortly after.  Whats the deal?

 

image.png

Even thought the statement in the second line is nearly identical, it has never failed.  I had to rewrite the first one to get around this issue.  I REALLY want to know why its doing this.  I have not touched this statement for months.  It has never failed.  I was going through and getting rid of some duplicate connections, then this popped up.  The SQL view referred to there is not even related to the sharepoint connections I was managing.

 

I rewrote the statement as such:

 

First(SortByColumns(Filter('[dbo].[VIEW_SWPDM_POWERAPPS]',ExtensionID=3 && DocumentID=DocID_Lookup,VariableID=47),"RevisionNo",Descending)).RevisionNo

I should be able to write this statement either way.  Its impossible to avoid problems if issues like this come up and I do not understand the reason why.  I really need an answer!


Thank you.

5 REPLIES 5
RezaDorrani
Level 10

Re: Statement is very unstable. Works once, then shows unknown error.

Hi @martinav 

 

what is the error message?

Super User
Super User

Re: Statement is very unstable. Works once, then shows unknown error.

@RezaDorrani ,

 

Oh, oops.  It got chopped off...

 

Oh, look!  Now that the first statement is re-written, the system is now picking on the second one!  The error is the same "An unknown error occurred."

 

image.png

Again, I can poke that statement into  label by itself, and it resolves readily.  See below, it gives a value of "4".

 

image.png

 

RezaDorrani
Level 10

Re: Statement is very unstable. Works once, then shows unknown error.

Hi @martinav 

 

Try saving that second statement into another context variable 

 

Super User
Super User

Re: Statement is very unstable. Works once, then shows unknown error.

@RezaDorrani ,

 

I rewrote the 2nd statement.  There were no errors, but the context variables were not being generated.  If I manipulated the statement in any way, the statement would reconcile, and the app would work fine in edit mode.  Once saved and published, runtime would not run.  I then would open back into edit mode, no errors this time, but the context variables did not contain information.  

 

I put the statements into labels, then used value(label.text) into my other statements instead of the context variables.  This was the only thing that would get this working.  

 

This stuff has been working for months.  I really need to know why this happened.  I see no way of finding this out.

Highlighted
RezaDorrani
Level 10

Re: Statement is very unstable. Works once, then shows unknown error.

That is weird

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 218 members 4,934 guests
Please welcome our newest community members: