Skip to main content
Solved

How to check if an action name exist within a graph?

  • January 10, 2023
  • 2 replies
  • 164 views

aaghaei
Captain II
Forum|alt.badge.img+10

Hello all,

I need to check in a graph an Action Name exist so I loop through the actions but I am unable to get the Action name. Can someone help me out here?

for (int actionID = 0; actionID < Base.Actions.Count; actionID++)
{
    string actionName = Base.Actions[actionID].ToString();

    if (actionName == "MyButton")
    {
        //Do Stuff
    }
}

 

Best answer by MoulaliShaik79

Hi @aaghaei,

After spending a couple of hours, I came to know that by using the below code, We can get all the ActionNames from the current Graph.

            foreach (var act in e.Cache.Graph.Actions.Keys)
            {
                var actionName = act;
            }

 

The below one is from ServiceOrders Screen:

 

 

 

I hope it helps you!

Moulali Shaik.

 

 

 

 

 

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+1
  • Semi-Pro II
  • 61 replies
  • Answer
  • January 11, 2023

Hi @aaghaei,

After spending a couple of hours, I came to know that by using the below code, We can get all the ActionNames from the current Graph.

            foreach (var act in e.Cache.Graph.Actions.Keys)
            {
                var actionName = act;
            }

 

The below one is from ServiceOrders Screen:

 

 

 

I hope it helps you!

Moulali Shaik.

 

 

 

 

 


aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • 1204 replies
  • January 11, 2023

Thank you @MoulaliShaik79 Appreciated for the time. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings