Skip to main content
December 14, 2021
Question

How can i refresh a variable after it brings me the vouchers for a service?

  • December 14, 2021
  • 5 replies
  • 0 views

a!localVariables(

local!seg,

loca!nombre,

local!apellidopat,

local!apellidomat,

local!buc: 00000121

local!buc: 00000187,

a!textField(
label: "BUC/NÚMERO DE CUENTA/NÚMERO DE TARJETA",
labelPosition: "JUSTIFIED",
instructions: "",
placeholder: "Ingresa los datos a buscar",
value: ri!busqueda,
saveInto: {ri!busqueda,
if(local!contador <= 17,{
a!save(local!seg,rule!PE6A(local!buc).result.body.partyRec.partyInfo.serviceLevelDesc),
a!save(local!nombre,rule!PE6A(local!buc).result.body.partyRec.partyInfo.personPartyInfo.personName.givenName),
a!save(local!apellidopat,rule!PE6A(local!buc).result.body.partyRec.partyInfo.personPartyInfo.personName.paternalName),
a!save(local!apellidomat,rule!PE6A(local!buc).result.body.partyRec.partyInfo.personPartyInfo.personName.maternalName)

/* realiza la busqueda por numero de Tarjeta */
},
if(local!contador < 12, {
a!save(local!seg, rule!PE6A(local!buc2).result.body.partyRec.partyInfo.serviceLevelDesc),
a!save(local!nombre,rule!PE6A(local!buc2).result.body.partyRec.partyInfo.personPartyInfo.personName.givenName),
a!save(local!apellidopat,rule!PE6A(local!buc2).result.body.partyRec.partyInfo.personPartyInfo.personName.paternalName),
a!save(local!apellidomat,rule!PE6A(local!buc2).result.body.partyRec.partyInfo.personPartyInfo.personName.maternalName)
/*realiza la busqueda por numero de cuenta */
},if(local!contador < 9,{
a!save(local!seg,rule!PE6A(ri!busqueda).result.body.partyRec.partyInfo.serviceLevelDesc),
a!save(local!nombre,rule!PE6A(ri!busqueda).result.body.partyRec.partyInfo.personPartyInfo.personName.givenName),
a!save(local!apellidopat,rule!PE6A(ri!busqueda).result.body.partyRec.partyInfo.personPartyInfo.personName.paternalName),
a!save(local!apellidomat,rule!PE6A(ri!busqueda).result.body.partyRec.partyInfo.personPartyInfo.personName.maternalName)
}

)
)
)
},
refreshAfter: "UNFOCUS",
requiredMessage: "",
validations: {}
)

)

    5 replies

    stefanhelzle0001
    Brainy
    December 14, 2021

    Can you elaborate? What exactly do you want to have refreshed?

    mikes0011
    Brainy
    December 14, 2021

    I really need to just keep this screenshot in my clipboard paste buffer at all times...

    The Expression Guru
    stefanhelzle0001
    Brainy
    December 14, 2021

    Made it an auto-expanding keyboard shortcut ...

    December 14, 2021

    I want the following variables to be refreshed for each search that i do, changing the sec,first name,surname to different ones

    local! sec,

    local!firstname,

    local!surnamepat,

    local!surnamepat,

    stefanhelzle0001
    Brainy
    December 14, 2021

    OK.

    The variable "local!contador" is not declared. Not sure what the if statements will do. What should be the value?

    Do you think it is a good idea to call that web service 4 times?

    Do you get any error messages? Did you try to do a reduced test? Does the expression return any values?