I have a Symfony 3.4 application with Craue Form Flow and I need to be able to start the flow (in some cases) on a given step (not step 1).
is there a way to do that? I have dynamic step navigation enabled.
thanks
EDIT:
When using the dynamic navigation I noticed the change in the URL.
It includes the instance code and the step number, something like this:
MY_URL/MY_PAGE&instance=7yCRU0UkfM&step=4
I was able to get the Instance code with
$_POST['flow_createProposal_instance'];
and then recreated the route and did a redirectToRoute but it starts on step 1.
I managed to do it by adding the data to the currentRequest, saving the form and then going to the next step
$currentRequest = $this->requestStack->getCurrentRequest();
$currentRequest->request->set('Step1', $step1Data);
$this->flow->saveCurrentStepData($form);
$this->flow->nextStep();
I repeat this for each step i need to "skip".
The $step1Data variable is simply an associative array with the values I need to save per step.
Related
I created a Firebase Deep Link for my Flutter app to open the app after the registration process was successful. The link looks like the following:
https://myLinkDomain.page.link/routeName/
During the registration process, a parameter must be appended to the end of the link, which I must read out in the app for successful completion.
The problem is that if I append the parameter to the end of the link, I can no longer access it. The link in this case looked like this:
https://myLinkDomain.page.link/routeName/?myCustomParam=myValue
If the parameter is given in the middle of the link, I can use it in the app. Like this:
https://myLinkDomain.page.link/routeName/?myCustomParam=myValue&apn=someStuff&isi=someStuff&ibi=someStuff&ifl=someStuff
However, the registration process requires that the parameter be added to the end of the link.
Is there a way to build the Firebase Deep Link so that the parameter can be added at the end and still be recognised in the app?
Thanks for any help!
No matter when this parameter goes - at start or at the end of the line.
I had the same problem with passing some custom parameters to my app.
Here is we should start with manual url construction:
firebase manual link construction
I have no easy way to pass parameters, so I just change the link parameter body to put here more parameters:
https://example.page.link/?link=https://example.com/?route%3Dprofile%26param1%3DA%26param2%3DB&apn=some&isi=some&ibi=some
prefix: https://redecor.page.link/
main body in link parameter (should be encoded). There is the place for all needed parameters you want to pass (route=profile¶m1=A¶m2=B) - all parameters should be encoded!
encoded should be like this: route%3Dprofile%26param1%3DA%26param2%3DB
other parameters (what are they means you could read here) for firebase proposes (no needs to encode):
apn=some&isi=some&ibi=some
Never mind. The solution is to change the order of the url parameters: myLinkDomain.page.link/routeName/…
Right or wrong: In Cypress, its impossible to read a value on page X, then keep this value and compare it to a value on page Y.
I can read a value from the page and log it:
cy.get('[data-e2e-selector=whatever]').then(elm => cy.log('Value from page X : ' + elm))
or, for instance, the number of elements with similar or partially matchin selectors:
cy.get('[data-e2e-selector=^whatever]').then(elm => cy.log('Number of elements like this on page X: ' + elm.length))
Hoever, I cannot create a variable of this, because of the asynchronous way Cypress runs. Right? Any value created to just be blank.
Nor can I pass the value read to a method, which in turn compares it to the value on the next page:
compareToValueOnNextPage(cy.get('[data-e2e-selector=^whatever]').then(elm => elm.length));
compareToValueOnNextPage(value: number) { // NB: Not sure if it's a number or string yet...
cy.get('[data-e2e-selector=^whateverNextPage]').then(elm => elm.length).should('have.length', 4)
}
Basically, if I want to compare values, the either have to be on the same page, or they need to be hard-coded. This is a huge limitation when actually end-to-end testing some applications. Very often, a value is created on page X, based on input which should in many cases ba random, thus creating a dynamic value in the test. Then, on page Y, that same value is fetch (from the backend) or shown in some other way, in a Summary etc. And, naturally, I want to compare the value shown on page X to the one shown on page Y/Summary. But this is not possible, due to the very unit-testing thinking that seems to be the foundation for Cypress.
Or am I missing something here? Are there ways around this that aren't ugly/smelly? I think it's possible to store the value on page X in a file, then read that file on page Y. However, Cypress seems to only have one option when reading the file, and that's reading the whole file and looking for a match. So that file would be a mess. Or I'd need several files.
I realize this is kind of trying to impose non-functional ways on a quite functional and asynchroeous technology. However, if it's not possible to "keep" a value and use it later, it's very limiting when it comes to end-to-end testing (even though it's not when the testing is unit-based on frontend components).
UPDATE:
As per Kerrry's suggestion in the answer below:
cy.get('[data-e2e-selector=dellan-accordion]')
.then(elm => cy.wrap(elm.length).as("myVariableName"));
-GO TO NEXT PAGE-
cy.get('[data-e2e-selector=betalingsplan-dellan]')
.then(elm => elm.length)
.should('have.length', myVariableName)
This yeilds "expected 4 to have property 'length'.
This means, obviously, that I cannot get the length of the length.
So I replace 'have.length' with 'eq':
cy.get('[data-e2e-selector=betalingsplan-dellan]')
.then(elm => elm.length)
.should('have.length', myVariableName)
And I get the following error:
expected 4 to equal 0
So, it seems that the first variable - myVariable - is gone after the first cy.get().
If I do everything inside one get (have another get inside that, where I go to the next page AND get the count of the elements), then it works. But the way Kerry shows it, it would be much more flexible. But, alas, the above error.
As jonrsharpe mentioned in the comments, please read the Cypress document on variables and aliases thoroughly. This is a core concept of Cypress, and it will give you a solid understanding of how to implement variables and carry the values between test steps.
The reader's digest example of what you how you can achieve is this:
cy.get('[data-e2e-selector=^whatever]')
.then(elm => cy.wrap(elm.length).as("myVariableName"));
What this is doing is cy.wrap will yield the value from elm.length in a Cypress command chain, which then allows you to assign it to an alias "myVariableName".
In your following test step where you want to compare the value on a separate page, you would then access the alias' value in one of two ways:
Using this.
cy.get('[data-e2e-selector=^whateverNextPage]')
.then(elm => elm.length)
.should('have.length', this.myVariableName)
OR
via cy.get()
cy.get("#myVariableName").then(function(variableValue){
cy.get('[data-e2e-selector=^whateverNextPage]')
.then(elm => elm.length)
.should('have.length', variableValue)
})
I'm developing a recoursive bar chart with the capability to navigate through a tree hierarchy by getting parent and child data from stored procedures.
It works well but I need to define a different action for the last node that instead of go to report should be: go to URL.
ssrs Action
Is there any way to do that?
I finally solved by using go to url for both: go to report and go to url.
this is possible by specifying the Url of the report as go to url concatenating the parameters using the HTTG GET syntax.
As you cannot set the report action via an expression, the easiest way I can think of doing this is to have two copies of your control or whatever you need the the action on. Have one point to your report as normal and one that points to your URL. Then set the visibility of each control based on the node.
So, assuming it's the series property that you have the action on...normally the Goto report series would be visible but when you are at the last node, the goto URL series would be visible.
This should work but I've not tested it.
Alternatively, if you can determine if the next node will be the last one, you could have two copies of the report. The first would be your report as it is now and the seconds would be exactly the same but with as different action. You can set an expression to call the correct report in the goto report action properties based on the node level. As I said before though, you will need to know if the node you are looking at is the penultimate one.
Neither solution is that elegant but it should give you what you want,.
This code is from a program I use to enter and track information. Numbers are entered as work orders (WO) to track clients. But one of the tables is duplicating the WO information. So I was trying to figure out a general outline of what this code is saying so that the problem can be fixed.
Here is the original line:
wc.dll?x3~emproc~datarecord~&ACTION=DISPLAY&TABLE+WORK&KEYVALUE=<%work.wo%&KEYFIELD=WO
What I think I understand of it so far, and I could be very wrong, is:
wc.dll?x3~emproc~datarecord~&ACTION
//No clue because don't know ~ means or using & (connects?Action)
=DISPLAY&TABLE+WORK&KEYVALUE
//Display of contents(what makes it pretty) and the value inside the table at that slot
=<work.wo%&KEYFIELD
//Calling the work from the WO object
=WO
//is Assigning whatever was placed into the WO field into the left side of the statement
I'll do my best to interpret the statement, with the limited information you've provided:
wc.dll is an instruction to invoke a DLL
? is introducing a list of parameters (like a query string in HTTP)
x3~emproc~datarecord~ seems like a reference to a function in the dll
& parameter separator
ACTION=DISPLAY set the ACTION parameter to the value DISPLAY
TABLE+WORK perhaps sets a couple of flags
KEYVALUE=<%work.wo% set the KEYVALUE parameter to the value of <%work.wo%
KEYFIELD=WO set the KEYFIELD parameter to the value WO
Hope that helps.
once again I have to ask you for a help.
I have a problem with creating public variable and using it in formula.
The details of this issue is:
1, right after starting a Lotus Notes Application i have to create public variable EmpNum which will be contain an employee number (the number will be imported from IBM Blue Pages)
2, this EmpNum variable will be used to filter the data in a view, so I have to use it in formula in View Selection.
I'll be very grateful if you help with this issue.
Maybe there is possible any simplest solution of this problem?
Thanks in advance,
Tomasz (td2003)
EDIT:
Torsten, Panu, thank you.
I've decided to try write an EmpNum variable in notes.ini using #SetEnvironment and read it by #GetEnvironment, and it works.
BUT (!) there is a very strange thing:
1) when I entered formula "SELECT((form="ITForm") & (Status="Completed") & (TX_EmployeeNumber=#Environment("EmpNum")))" the view shows me all document where "TX_EmployeeNumber" is EMPTY;
2) otherwise when I entered formula "SELECT((form="ITForm") & (Status="Completed") & (TX_EmployeeNumber!=#Environment("EmpNum")))" (not equal) the view shows me all document where "TX_EmployeeNumber" is NOT EMPTY and no matter if TX_EmployeeNumber have exactly the same value as EmpNum.
For example: if EmpNum="P11" the view with 2nd formula shows the documents where TX_EmployeeNumber fields contains "P11", "P22", "A32" and so on.
I'm sure that #Environment("EmpNum") retrieves correct data from notes.ini.
I'm totally confused and completely don't know what's going on.
Do you have any idea about this?
First of all: There are NO public variables in Lotus Notes as you request it. Neither in LotusScript nor in Formula. Every variable just lives in its context, never in the complete client.
There are two places to put such a variable:
in the notes.ini, where you can set / read it using Formula (#Environment, #SetEnvironment, #getEnvironent) or LotusScript (NotesSession.GetEnvironmentString, NotesSession.SetEnvironmentVar).
In a Profile document in a database, where you can get it using #GetProfileField (Formula) or NotesDatabase.GetprofileDocument() (LotusScript)
Both of these approches will NOT help you for your number 2.
There is only ONE View- Selection- Formula for ALL Users. Putting something "userspecific" in there will let it render correctly for ONE value (the one, that the server uses when building the view- index), but not for all the others.
To solve your problem you can use:
a) An embedded View
A view that is categorized by empNum
A Form that has this view embedded and a Formula for "Show single category" for this embedded view set
b) A SPOFU view
SPOFU is "Shared, private on first use" and means, that every user has his own copy of the view. These views have some caveats and are hard to maintain. You should NOT use them, if you are not totally aware of the implications (getting the ACL right is one very important thing for these views)...
EDIT (due to change in question): SPOFU will neither work with Environment nor with Profile- documents, as the methods to read them are not supported in Views... So b) is not really an option... Sorry...
It is possible to use the #SetViewInfo formula in the QueryOpen and/or PostOpen of a view to get the view to only present data from one category. Be careful with this because you will need to touch EVERY view so that the value is cleared if the user navigates to a view which is not categorized by the employee num...
FWIW: I only have done this using #UserName not with another piece of data. I suggest you do that by having the import process add the fully qualified Notes name of the user to the documents as they are imported.
You can modify view selection formula with NotesView class. In this case you would have to use private views.
A better solution would be to use an XPage to show the view and use category filter. Or if you want to use traditional style then embed the view to a form or page and use "Show Single Category" feature.