Loop a query result and save a specific value form each row

hi, i got a result from a query and save it in a variable, so, i need to use that result and take some values of each register, i mean, i need specific values from each row from the query resultant and put that value in a desktop aplication.
could you help me please with that?
thank you

1 Like

Hello @UBP_Bo

You must be storing the value that you get from excel in some variable. This data is stored in the form of array. You can call this variable and get the desired data where ever you want. I hope you understand. If you dont know how to get the data from array let me know.

If you can share the ss of the flow I can guide you much better.

1 Like

Hi Muhammad, thank you for the response… look i have the data in a table in Database, so i want to read this data from this table, select each atribute (name, email, phone, etc) and put them in textboxes in an windows aplication… i think i explained better :smiley:

so i made a query and save the result of dataset in a variable, but i cannot or i dont jnow how do i have to put each value from each atribute in a new variable to use it in a textbox in windows aplication.

i hope i explain it well :slight_smile:

thank you very much

1 Like

Got it. Can you share the result of the data stored in this variable “so I made a query and save the result of dataset in a variable”.
I want to see how data is stored in this variable, then I can guide you how to use it in textbox in windows application.

Hi Muhammad, thank you again for the response… i attach now the screenshots






as you can see:

  1. i save the result in a variable,
  2. i save the content of the variable in a excel (i’m trying the find the solution like that wat)
  3. i make a loop in that excel and trying to save in two different values intto two variables (ci and cite) but it doesnt work

thank you for your help

best regards

Ok Great! So as I explained earlier, the data is being stored in a variable “tabla_a_excel” in the form of array. Now we have to get the single data from this variable and store it in new variable “ci”.

Solution: For this you have to call the variable “tabla_a_excel” in variable “ci” with the index of the data you want. For example tabla_a_excel[0], write this in the calculation section of “ci” variable. You’ll get the 1st value that is stored in the tabla_a_excel variable.

Pass “ci” to Input activity

I hope it helps you. If not, we can meet. You’ll share your screen and then we can find solution.

Question: Are you able to store data in the excel sheet?

Hi Muhammad. again, thank you fot your response… answering your question, yes i can save the data correctly in excel.

About the solution, i cannot get the data in separated variables :cry:

i tried making the example with loop (for each row) and without it, and doesnt work :frowning:

@UBP_Bo Ok! If you can save values in excel sheet. Then simply read the excel sheet and get the values. Get single value in a variable and pass it to input activity.
If you are available for meeting on google meet. I would suggest to solve this query on meet. We def can find solution for this problem if that is ok for you.

Hi Muhammad, thank you for your response… it would be awesome if we can solve this in a meeting on google meet… i can meet monday o tuesday in morning around 11 am GMT -4… but if you can only afternoon, i can make some time for this meeting…

thank you so much

Best regards

Ok great! I can be available at 11 am GMT.

Hi Muhammed, thank you for response… so, we can hace the meeting tomorrow tuesday december 5th at 11am GMT? here you have the link :slight_smile: https://meet.google.com/cke-irkg-qji

thank you so much

bes regards

1 Like

I am still up for the meeting @UBP_Bo . Can you reschedule it for tomorrow. Let me know if you still interested in meeting.

Hi Muhammed, thank you for response… of course i’m still interested… could we have a meeting tomorrow at morning in Bolivia? it can be 11am (GMT-4) or you can tellme what time is good for you and i can be there.

Have a nice day

Hi Muhammed, i hope you are having good days… i think we are having some troubles for having a meeting ajaja… can we meet in tuesday? at 11am Bolivian Time (GMT-4)… the link is this one: https://meet.google.com/vpk-tist-zas

Thank you very much Muhammed

Best Regards

I was on leave previous days. I am sorry for being not available. I am back to working life. Can you make it today? I would suggest you can contact me on LinkedIn for better communication. Here is link to my profile https://pk.linkedin.com/in/hayyan-khan-98b3b91bb