PowerApp Side Effects error for If-statements? - if-statement

I have an error that is just started happening and is driving me crazy. Multiple If statements say they "have side effects" and will not be evaluated. In most cases, I'm just trying to say that if it meets 2-3 conditions, set variables to x. I don't know how to fix it, and google searches on side effects are not turning up much. Any ideas on how to fix or at least where to research? Any help very much appreciated!!
Example

IsEmpty and visible are both booleans already so no need to check they are true.
You can do:
If(isEmpty(AttachFiles.Attachments) && Image12_1.Visible,
Set(varX, true),
Set(varY, false)
);
you can also check if the above is false by adding a ! in front of the two boolean properties. ie, !isEmpty(xxx)

Related

A cyclic reference was encountered during evaluation in Power BI

When I press refresh button in Power BI (version 2.112.1161.0) I have this error
message
! Table1
A cyclic reference was encountered during evaluation.
! Table2
Loading blocked by failures with other queries.
I always solve it by going to another tab (sheet) and press refresh button and everything's fine. The refresh completes.
Is this error serious? How could I fix it or debug it?
You can go through some definitions for "Cyclic/Circular Reference". You probably created 2 logical columns that are dependent on each other. As for column A, you are using the value from column B. And same for column B, you are using the output of column A. It's a deadlock.
The seriousness depends on your use of data from those columns as they will never give you output. If they are a must for your report, this is serious :) and you have to fix this.
This is a long-standing bug that you can safely ignore. There must be some race condition bug that occasionally causes the PQ engine to fail but as you say, it goes away on its own.
For others reading, this is different to the circular references errors you sometimes get in the vertipaq engine caused by model ambiguity caused by relationships, multiple calculated columns or genuine logical errors and is to do with the PQ engine.
You are not giving us a whole lot to go by. If I read your problem correctly, the initial refresh is the issue, subsequent ones work.
From my perspective, there are two possible issues here:
The software version you are using is buggy, as others have suggested. See also this link, which suggests you could uninstall/reinstall the desktop client you are using. However, just like in the case that post author describes, it seems to present itself as a mere annoyance, nothing that seems worrisome, provided that the results you get are accurate otherwise.
Alternatively, it could be a true circular reference that somehow gets resolved in between, but I doubt that. Here is another link describing circular references in detail.
If this were me, I'd try the uninstall/reinstall and see if that indeed fixes it. Otherwise, I'd probably ignore it.
Try refreshing the data for Table 1 first then refresh all the tables that should resolve the issue.

Prolog beginner question about scheduling and assigning groups

It's descended into just randomness since I obviously completely can't feel the logic of this logic, even though over a year ago I felt I was getting somewhere, then didn't look at it until now, and it's all just a complete random mystery of what thing is stopping this from working.
pref(mark,a).
pref(bart,a).
get_pref(A,[X|Y]):- pref(X,A).
get_pref(A,[X|Y]):- pref(X,A),get_pref(A,Y).
timetable([Cl,L1],[C2,L2]):-
All = [S1,S2,S3,S4],
L1 = [S1,S2],
L2 = [S3,S4],
get_pref(Cl,L1),
get_pref(C2,L2),
list_to_set(All,All).
with the query timetable([a,[S1,S2]],[b,[S3,S4]])
No results are found. Then I added pref(mary,b). and pref(sue,b). and I get 16 results which at least don't have duplicated names show switched position of names as well as oddly enough a _ variable either no times, once or twice.
In the initial statements, or predicates (if that's what they're called), I've seen some tutorials show a get_pref(A,[]):- additionally, looking like it's 'setting something up', sometimes a :- ! on things that all seem roughly related but it's all gibberish the way my dyslectic/adhd/autistic brain interprets the examples and tutorials.
I am trying to get towards building a comprehensive scheduling algorithm but these first stages are a time-consuming nightmare of trial and error. Do you have any pointers on the direction and strategy to take with this, or links to sites or videos that actually, once and for all, allow those of us who are used to different forms of problem solving, to bridge the gap?
Thank you!

How to link multiple ports from a Expression to multiple groups of a Union

I add an image in order to explain myself better.
I have 300 something ports in a expression. I have created the equivalent number of groups in a union. I want each port of this expression to go to a port/field of the Union. One to one relationship. It seems like powercenter is not able to do this with autolink, or at least I'm unable to find the proper way to do this. How could I work arround this issue? Because I've been told that is likely that in a few days it will be more than 700 ports, and the amount it takes to do by hand is quite insane. Thanks in advance.
I'm surprised it validates... union is for homogenous sources but you seem to be trying to pivot your data (in which case I'd suggest using another transformation i.e. a normalizer and Informatica will start behaving as expected)
Possible solution: make a bunch of connections, save and export the file as xml, go to the lines when the connections are done, and replace that zone with as many rows as you need.
What I did specifically was to get the original rows, change the names as appropiate with the help of notepad++ and excel, and then go back to the original file and replace all of it. Check everything three times, and import the file back to powercenter.
I say possible solution because it's messy and dirty, but even though it may lead to mistakes I feel like the amount is vastly inferior and you have the versioning on your side, so just save before exporting. If someone with more experience could tell me it's thoughts about this, it would be a great opportunity to learn, just leaving this in case it goes unanswered

Restarting a program with a key word - re looping?

So I've made a program in class for a project, this is done using C++, which is a menu system with one sub menu, to then deliver correct directions from one location to another,
this involved many else and if statements as well as a while loop. however, i'm wondering if it is at all possible to make it so if the user enters a particular string, to restart from the beginning of the program? such as a small function which is a re director to the top of the code again? so if the user messes up on the first menu, they can type 'back' in and go back to the previous menu?
it sounds easy, and its simple, but i'm having trouble with it, and don't know what the best way to approach this would be, despite how minor it is!
Any help is appreciated
thanks!

Using Clojurescript with Light Table

I have been trying to use Clojure Script with Light Table and lein-cljs without much success.
The main problem seems to be with dependencies. It seems like evaluating a cljs (ctrl-shift-enter) page does not recursively evaluate the dependencies. The result of this is that I have to manually evaluate each dependent file. If I refresh the HTML page, or make a change I have to do this all over again. Other times evaluating a page doesn't work, and just gives me good not found error.
Clearly this is not usable. Am I doing something wrong? For Clojure it seems to work just fine.
Stack Overflow is probably a bad place to learn more about Light Table. I'd drop into the Light Table channel at #lighttable on irc.freenode.net. Somebody can help you there!