计数值未保存到新声明的变量

已捕获web_reg_save_param,并且计数值未保存到新声明的变量中。

我尝试通过全局和局部声明。

int Exsistinggoal;
char ParamName[50]; 
int i;

// {"id":"49F2DC5064524DC3962EE783959CA211","name":"Legacy Protection 1",web_reg_save_param("c_Exsistinggoal","LB= 
     {\"id\":\"","RB=\",\"name\":\"","ORD=All",LAST);


web_add_header("Authorization:","Bearer {c_Token05}");

web_add_header("X-request-ID","8dd9e540-fa3c-11e9-8c6b-47e84a716a57");


web_url("goals_3","URL={pURL02}/wms/v1/plan/plans/{c_PlanID}/goals?entityId= {c_EntityID}","TargetFrame=","Resource=0","RecContentType=application/json","Referer={pURL02}/mwp/select-goals","snapshot=t79.inf","Mode=HTML",LAST);


Exsistinggoal= atoi(lr_eval_string("{c_Exsistinggoal_count}"));

c_Exsistinggoal_count此值应保存到变量中   Exsistinggoal

但是目前它显示的是一些随机值:153500656

zabcdhello 回答:计数值未保存到新声明的变量

James Pulley在我的POV中回答了这个问题。 如果在web_reg_save_param函数中使用ORD = ALL。 LR将满足关联条件的计数编号保存在 _count中。如果在这种情况下获得153500656的值,则意味着web_reg_save_param函数关联了数组中的153500656项。

//You can use the 1st correlated item
ExsistingGoal_1= atoi(lr_eval_string("{c_ExsistingGoal_1"));

//You can use the 153500656th correlated item
ExsistingGoal_153500656= atoi(lr_eval_string("{c_ExsistingGoal_153500656"));

//In frequently usage,you can judge flow by <paramname>_count,and output the specific <paramname>_<count>. 
if(atoi(lr_eval_string("{c_ExsistingGoal_count}"))>0)
    {
        lr_output_message("c_ExsistingGoal_1=%s",lr_eval_string("{c_ExsistingGoal_1}"));        
        lr_end_transaction("Correlation Pass",LR_AUTO);
    }
    else
    {
        lr_end_transaction("Correlation Fail",LR_FAIL);
    }
,

请使用以下功能将为您提供帮助-

web_reg_save_param(“ ExsistingGoal”,“ LB = someText”,“ RB = \”)“,” Ord = ALL“,LAST);

lr_output_message(“ PC:%d”,atoi(lr_eval_string(“ {ExsistingGoal_count}”))))

本文链接:https://www.f2er.com/3161179.html

大家都在问