Hi,
I'm trying to improve a manual process where i am collecting data (6 questions) and based on the replies calculating a value and replying to each visitor.
Each time a visitor fills in the questions i am receiving an email notification with the details and i'm pasting them in a Sharepoint list with the following:
Name surname email answer 1 answer 2 answer 3 answer 4 answer 5
John Doe john.doe@m.com Answ 1 - 1 Answ 2 - 2 Answ 3 - 3 Answ 4 - 4 Answ 5 - 5
The answers have a point value at the end in the form of "Answer 1 - 1".
I've been trying to set up a flow that would trigger when a new line is created in the sharepoint list and, select left 1 character for each answer and then initialize it as a variable, integer and calculate the sum of all answers.
As i've not been able to get this to work i discovered that i could use compose in the following fashin:
Compose - Answer 1 - 1
and then use
Solved! Go to Solution.
Hi @mihaim44
are u still confused on how to take the last value (ie the points)
Hi @mihaim44
You can try the split operation here as well to extract the points
For eg your data is Ans - 1
Then use this split expression
Try this way around
Mark it as solution if it helps
Regards,
Nived N
Hi Nived,
I'm not sure i understand.
As an example, this is how the flow is currently configured :
The answer values are the ones called "Intrebare x Value" and they contain values from "Text - 1" to "Text - 6".
As in the sharepoint list - Intrebare x Value is a drop down menu with the following options:
"Text - 1"
"Text - 2"
...
"Text - 6"
The compose i used extracted the last value but i do not understand how to use the formula you gave.
Should i add it into a compose with the expression:
int(split('Intrebare x Value','-')?[1]) ?
i tried the above in a compose but i only get it to send the value or fail.
I apologize for being dense, my coding experience is extremely limited to say the least.
Thanks in advance !
Kind regards,
Mihai
Hi @mihaim44
I showed a simple example to show you the idea
Here i created a sample flow
First i intilazed a variable a1 with value Answer 1- 1
Then in compose action next to it, i used the following expression to extract the 1 from that a1 (ie the point)
This is how i extracted for one data ie a1 variable
Simmilar way u can try for others too
Hi Nived,
I've tried the following:
When the SP list is updated the flow picks up the value from the row (text) then tries to initialize it as "V1" as int and then compose with : split(variables('V1'),'-')?[1]
But it returns :
The variable 'V1' of type 'Integer' cannot be initialized or updated with value of type 'String'. The variable 'V1' only supports values of types 'Integer'.
Is this due to the fact that the row it reads from is declared as test / string ?
Should i do a compose before the initialize in order to convert "Intrebare 1 value" to Int, then initialize and compose in order to extract the last number ?
Kind regards,
Mihai
Thank you very much !
Worked like a charm !
Kind regards !
Mihai
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
28 | |
28 | |
26 | |
26 | |
23 |
User | Count |
---|---|
63 | |
51 | |
44 | |
32 | |
30 |