Skip to main content
New Participant
Dec 14, 2021 5:18 PM UTC
Question

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

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
    Dec 14, 2021 5:23 PM UTC

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

    mikes0011
    Brainy
    Dec 14, 2021 5:25 PM UTC

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

    The Expression Guru
    stefanhelzle0001
    Brainy
    Dec 14, 2021 5:26 PM UTC

    Made it an auto-expanding keyboard shortcut ...

    New Participant
    Dec 14, 2021 5:32 PM UTC

    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
    Dec 14, 2021 5:37 PM UTC

    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?