Bind values from a query created inside a conditional

Created a conditional in a serverconnect action. The condition is a query.

If the query does not return a value I run 2 insert server actions
else
If the query returns a value I am running two other queries.

The issue is that these two queries (inside the else condition) are not accessible from the AppConnect UI so I can not use them.

Is this a bug or something that the conditional server action does not support. Attaching screenshot

Green arrows point to the root queries that are visible in the AppConnect UI.
Red arrows point to the queries inside the conditional that are not visible in the AppConnect UI.

Thank you

I assume you have already looked into the output checkboxes and made sure those are on because I know you have advised others about this before. But you never know so I will just mention it incase.

Yes I did.
Thank you

1 Like

Sorry. I have never noticed this issue to be honest but I would imagine you can get to those steps. I think this will be one for the team. Lol.

Truth is that I rarely use conditional this way, but in this case it was the most efficient approach. It is a pitty it is not workig. Thank you very much for your time @psweb

As i always say. type them manually :slightly_smiling_face:
the formatter NEEDS improvements. its better than before but it still limited to simple things.

2 Likes

@George Any plans for a fix for this issue? I seems to have gone unnoticed. Issue still present in 1.7.2.

I think it is not issue … Please use the same query name

Actually this is just a bad design. Your Server action should always return the same data structure.

If you make conditional data return - you will never know which data is returned and have to do a lot of client side work to check this.

So a much easier way is just to define to actions that each return its own data for each type.

1 Like

Alright. Will modify my logic and separate the server actions.

1 Like

@George
i faced the same problem with the formatter but im not trying to return the data to the client i was trying to bind data in the same server action. its not a “bad desgin” in some cases its a must.

try adding a repeat inside a repeat. you will not get the formatter to display the data correctly.

i really wish you guys improve this.

That’s not really related to the initial post/question.
As I explained you the last few times: We need detailed step by step explanation of the issue (preferably with screenshots), so we can recreate it and check what’s wrong.

I was talking only about returning different data based on condition.

Of course within the action itself you can have multiple conditions and repeaters that is perfectly normal.

it was an example that is related to the original post about the formatter limitation from my understanding.

No it isn’t, these are not related and not really related to data formatter…
If you have a specific issue post it as a separate topic explaining it step by step.