Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Nolgath
Creator
Creator

Inphinity Forms - Duplicate Values once Recalculating | Can't Edit values from other Form

I have 2 Forms.

1st Form is for input that will then be concatenated to 2nd Form. After that concatenation User should be able to edit 2nd Form values from 1st Form and recalculate having 1 row with the changes accordingly.

I need to bring from 1st Form the Name,Date,Country,Status. Which I am doing and everything Is ok in that regard.

The issue is when I try to add or change a values in Forms that came from the 2nd Form I get a duplicate line where the fields Country, Status and Phone disappear becomeing Null but in the second duplicated line i get my changes there.

 

My script is:

// Load WECARE_CUSTOMERS.qvd
[form_data_qvd]:
NoConcatenate
LOAD *
FROM [lib://FORMS_DATA (cars2clickvm_radu.chitu)/WECARE_CUSTOMERS.qvd] (qvd);

rename table [form_data_qvd] to [T_form_data_qvd];

[T_form_data_qvd_full]:
noconcatenate
LOAD
*,
if(key<>previous(key),1,0) as @actual
RESIDENT [T_form_data_qvd]
ORDER BY
key desc, ChangeDate desc;

drop table [T_form_data_qvd];

// Filter and transform Attribute_customers
[Attribute_customers]:
noconcatenate
LOAD
"ATTRIBUTE TO",
key as "Company Name",
Phone,
Country,
Status,
Date,
'geomatch' as validation
RESIDENT [T_form_data_qvd_full]
WHERE
@actual = 1
AND "ATTRIBUTE TO" = 'Catarina Duarte';

drop table [T_form_data_qvd_full];

// Update Status for CDWECARE
TMP_Write:
Crosstable(column, value, 2)
LOAD
'CDWECARE' as FormInstance,
"Company Name",
'NEW' as Status
RESIDENT Attribute_customers
WHERE Status = 'NEW';

Write:
LOAD *
EXTENSION Forms.Write(TMP_Write);

Drop table TMP_Write;
Drop table Write;

// Update Status for WECARE_CUSTOMERS
TMP_Write:
Crosstable(column, value, 2)
LOAD
'WECARE_CUSTOMERS' as FormInstance,
"Company Name",
"ATTRIBUTE TO",
'USED' as Status
RESIDENT Attribute_customers
WHERE Status = 'NEW';

Write:
LOAD *
EXTENSION Forms.Write(TMP_Write);

Drop table TMP_Write;
Drop table Write;

// Load CDWECARE.qvd
[form_data_qvd]:
NoConcatenate
LOAD *
FROM [lib://FORMS_DATA (cars2clickvm_radu.chitu)/CDWECARE.qvd] (qvd);

rename table [form_data_qvd] to [T_form_data_qvd];

[T_form_data_qvd_full]:
noconcatenate
LOAD
*,
if(key<>previous(key),1,0) as @actual
RESIDENT [T_form_data_qvd]
ORDER BY
key desc, ChangeDate desc;

drop table [T_form_data_qvd];

Concatenate(Attribute_customers)
LOAD
Country,
Phone,
Date,
key as "Company Name",
key,
"New Phone",
"New Email",
Email,
Contact_Person,
Position,
Linkedin,
Called,
"Call Attempts",
Emailed,
"Emails Sent",
"Last Email",
Update,
"Login Date",
"Login User",
"Login Password",
Login,
"Call Status",
NOTES,
"New contact person",
"Last Phone Call",
"Date (cars sold)",
"Number of cars",
Interests,
test,
ChangeDate,
ChangeBy,
Deleted,
Status,
'wecare' as validation
RESIDENT [T_form_data_qvd_full]
WHERE
@actual = 1;

drop table [T_form_data_qvd_full];

// Split Brands
Brands:
LOAD
"Company Name",
SubField(Interests, ';') as Interested_Brands
RESIDENT Attribute_customers;

STORE [Attribute_customers] INTO [lib://FORMS_DATA (cars2clickvm_radu.chitu)/test_test_test.qvd] (qvd);

Please see pictures, first is the loading and second picture I just changed the Status to a different one.

part1.jpgpart2.jpg

I've been in this for a few days now and can't seem to figure this one out, i have Inphinity for 1 week now so I am new to that as well.

 

I would really appreciate any help in this one!

Labels (2)
0 Replies