I am dynamically referencing values gleaned from a Form. The values of the response references are, of course, the answers to the questions. I want to use the values of the cells to access the values of the responses.
The Structure
In a table I have a list of all the response codes from a form; the table looks like this:
Not all questions will have answers because there sometimes will not be as many questions as there are slots for questions.
I wrote a query for a filter block that only accepts rows that start with the appropriate section number and checks if the RespCodeStep3 is empty; it looks like this:
(startsWith(item()?['SNumRNum'], concat('S', string(variables('intSectNum')))),not(empty(item()?['RespCodeStep3'])))
The Problem
The above query will check if the cell at item()?['RespCodeStep3'] is empty; the above query is not checking for the value of item()?['RespCodeStep3']
The Debug
I tried changing the last part of the query to:
not(equals(item()?['RespCodeStep3'], null))
but that, I believe, checked the same thing, specifically, if the cell at that address == null.
The Question
How do I get Flow to check the value of the reference to the response using cell references?
How do I get Flow to check the value of the response reference specified by item()?['RespCodeStep3'], where the cell text at item()?['RespCodeStep3'] is outputs('Get_response_details')?['body/rcf2fe0bae00045cc8caaff546c4ff32c']
Thank you for you assistance.
What i understand from your requirement is that you want to get Response ID from RespCodeStep3 column? is it correct?
And in condition-
not(empty(item()?['RespCodeStep3']))) --> if(empty(item()?['RespCodeStep3']),'',item()?['RespCodeStep3'])
Thanks
Hardesh
From the RespCodeStep3 column, I want to load an array IF the VALUE of the response exists.
My current code checks to see if there is a value in the cell in RespCodeStep3. I want to check the value that the code in the cell represents.
Instead of checking if the cell in RespCodeStep3 has anything, I want to check to see if the value that is represented by the code in the cell has exists/has a value!=null.
Not if outputs('Get_response_details')?['body/r9ce41c81d05d4afbae990bc934ae46c6'] is in the cell but if there is an answer behind outputs('Get_response_details')?['body/r9ce41c81d05d4afbae990bc934ae46c6'].
Thank you, @Hardesh15 for your interest in helping me; if I have not been clear, I will happily try again.
Still it is not clear to me completely.
What i understand -You are trying to say that from your Respcode3 column array element do you want to fetch response answer if exist and it shoulbe be with respect to Respcode3 array element.
Thanks
Hardesh
Yes; very, very close.
If I can do that, get the actual response from the response code, then I can get the rest.
If I can get, for example,
"Yes"
from
outputs('Get_response_details')?['body/r056b91fda84645aa8d805d04dc89d7cb']
...then I believe I will have my solution....(maybe with a Set Variable, or Compose?)
In your MS Form, do you want to check when someone submit response then if any questions has value or not?. If it is has value then Respcode3 column condition return yes.
Am i correct?
Yes, that is it exactly. All I need is a true if there is a response and false if there is not a response. That way, I can append to string variable only the response codes that have an answer.
I even tried using a Compose to build the expression like so:
Set Variable:
strResValue = r9525d726282940a5b56f6bc7dcc2a59c
Compose3
outputs('Get_response_details')?['body/@{variables('strResValue')}']
Compose 4
@{concat('@{',outputs('Compose_3'),'}')}
And then find the result of that in the next Compose:
Compose 5
@{outputs('Compose_4')}
Which faithfully outputs the result:
@{outputs('Get_response_details')?['body/r9525d726282940a5b56f6bc7dcc2a59c']}
One would think that that would do it, but, no.
So do you want to construct this kind of expression and then compare it with Respcode3 colum value.
Just thinking from your previous reply.
Thanks
Hardesh
You're awesome, Hardesh.
If it helps, here are some more fail attempts at a solution:
I reproduced your issue. And found that body/code is enclosed by single code is considered by flow as valid connection so it will give you output. you can check peek code of any question in compose.
What i and you are doing that we are manipulating code with compose and here it is a problem because compose is just giving output of our input. it does not make any reference to code value dynamically. Compose is treating that code as garbage. When we are making whole expression though compose.
Thanks
Hardesh
Interesting. I think you described a solution, but I was not able to understand it. I believe it has something to do with the single quotes; I will play around with that for a bit and see if I have any luck.
i am saying for this part ['body/ResponseID']. it is in single quote. When we produce same with compose which is not dynamically referred to ResponseID.
Add one compose and pass your question from dynamic panel then see compose peek code. you will get idea.
Thanks
Hardesh
Doing as you suggest, I see that there is a leading "at" sign, @, in front of the dynamically filled data. I was using @{ ... } before, and that did not work.
Now, I am trying to add a "@" only, but it still doesn't grab the response to the form question. I have the inputs, Peek Code and outputs for three compose blocks demonstrating what I am seeing:
COMPOSE 3
Inputs:
outputs('Get_response_details')?['body/@{variables('strResValue')}']
Peek Code:
Join digitally, March 2โ4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
89 | |
60 | |
42 | |
35 | |
32 |
User | Count |
---|---|
79 | |
67 | |
57 | |
49 | |
41 |